Turbopack build feedback #77721
Replies: 38 comments 46 replies
-
when creating a standalone build and starting with just |
Beta Was this translation helpful? Give feedback.
-
why does with running
however, running
|
Beta Was this translation helpful? Give feedback.
-
turbopack build does not correctly resolve fonts from next/font - #77861 |
Beta Was this translation helpful? Give feedback.
-
next build --turbo with nextjs 15.3.0 generates chunks with invalid filenames on Windows. |
Beta Was this translation helpful? Give feedback.
-
import jackson from "@/server/services/jackson";
import { redirect } from "next/navigation";
export async function POST(req: Request) {
const { oauthController } = await jackson();
const formData = await req.formData();
const { redirect_url } = await oauthController.samlResponse({
RelayState: formData.get("RelayState") as string,
SAMLResponse: formData.get("SAMLResponse") as string,
});
redirect(redirect_url as string);
} import { clientEnv } from "@/env/client";
import { createUrl } from "@/lib/utils";
import jackson, {
type IConnectionAPIController,
type IDirectorySyncController,
type IOAuthController,
type ISPSSOConfig,
type JacksonOption,
type OIDCAuthzResponsePayload,
} from "@boxyhq/saml-jackson";
import config from "../db/config";
export type { OIDCAuthzResponsePayload };
interface Global {
apiController?: IConnectionAPIController;
oauthController?: IOAuthController;
directorySync?: IDirectorySyncController;
spConfig?: ISPSSOConfig;
}
const g: Global = global as unknown as Global;
const externalUrl = createUrl.subdomain("admin-cms").path();
const opts: JacksonOption = {
externalUrl: externalUrl,
samlAudience: clientEnv.NEXT_PUBLIC_APP_NAME,
samlPath: "/api/sso/acs",
oidcPath: "/api/sso/callback",
db: {
engine: "sql",
type: "mysql",
url: config.primary,
},
openid: {},
noAnalytics: true,
};
let apiController: IConnectionAPIController;
let oauthController: IOAuthController;
let directorySync: IDirectorySyncController;
let spConfig: ISPSSOConfig;
export default async function init() {
if (
!g.apiController ||
!g.oauthController ||
!g.directorySync ||
!g.spConfig
) {
const ret = await jackson(opts);
apiController = ret.apiController;
oauthController = ret.oauthController;
directorySync = ret.directorySyncController;
spConfig = ret.spConfig;
g.apiController = apiController;
g.oauthController = oauthController;
g.directorySync = directorySync;
g.spConfig = spConfig;
} else {
apiController = g.apiController;
oauthController = g.oauthController;
directorySync = g.directorySync;
spConfig = g.spConfig;
}
return {
apiController,
oauthController,
directorySync,
spConfig,
};
} |
Beta Was this translation helpful? Give feedback.
-
We are from LobeHub Team and building LobeChat with nextjs. I have tested the building with turbopack now and It's amazing fast! ![]() And Here is a compare of webpack and turbopack:
You can see turbopack reduce 60% building time! But there still an issue with integate with serwist: serwist/serwist#54 . Can wait to move to turbopack after this integration! |
Beta Was this translation helpful? Give feedback.
-
Turbo build production fails with Prisma (tried on both 6.5.0 and 6.6.0 using the prisma-client-js generator):
prisma schema
folder structure
prisma loaded in the frontend like this
builds all ok without the turbo flag, and next dev --turbo also works fine |
Beta Was this translation helpful? Give feedback.
-
Build Performance Comparison
|
Beta Was this translation helpful? Give feedback.
-
خیلیییی سریعه 🔥🔥 |
Beta Was this translation helpful? Give feedback.
-
I with my small project don't see any performance benefits. Are we only supposed to see the benefits in bigger projects? I have even tried running the build command multiple times to see if i would get better results without any luck. I ran each of these with a clean build first. Hardware: running without > next build
▲ Next.js 15.3.0
- Experiments (use with caution):
✓ useCache
Creating an optimized production build ...
✓ Compiled successfully in 1000ms
✓ Linting and checking validity of types
✓ Collecting page data
✓ Generating static pages (6/6)
✓ Collecting build traces
✓ Finalizing page optimization
Route (app) Size First Load JS
┌ ƒ / 572 B 372 kB
├ ƒ /_not-found 990 B 105 kB
└ ƒ /login 572 B 372 kB
+ First Load JS shared by all 104 kB
├ chunks/1684-3cc8d39bf08bda7e.js 46.4 kB
├ chunks/4bd1b696-79901f1c062801da.js 53.2 kB
└ other shared chunks (total) 4.83 kB
ƒ Middleware 33.3 kB
ƒ (Dynamic) server-rendered on demand
npm run build 15.84s user 2.25s system 183% cpu 9.886 total running with > next build --turbopack
⚠ The config property `experimental.turbo` is deprecated. Move this setting to `config.turbopack` as Turbopack is now stable.
▲ Next.js 15.3.0 (Turbopack)
- Experiments (use with caution):
· turbo
✓ useCache
Creating an optimized production build ...
✓ Compiled successfully in 2.9s
✓ Linting and checking validity of types
✓ Collecting page data
✓ Generating static pages (6/6)
✓ Collecting build traces
✓ Finalizing page optimization
Route (app) Size First Load JS
┌ ƒ / 0 B 420 kB
├ ƒ /_not-found 0 B 420 kB
└ ƒ /login 0 B 420 kB
+ First Load JS shared by all 422 kB
├ chunks/1fa3394cc56fb597.js 77.1 kB
├ chunks/780cf8f2a2a5b7ec.js 13.1 kB
├ chunks/7e8ef395dd44ad63.js 270 kB
├ chunks/e694e57256351634.js 18.9 kB
└ other shared chunks (total) 42.9 kB
ƒ Middleware 50.5 kB
ƒ (Dynamic) server-rendered on demand
⚠ Support for Turbopack builds is experimental. We don't recommend deploying mission-critical applications to production.
- Turbopack currently always builds production sourcemaps for the browser. This will include project sourcecode if deployed to production.
- It is expected that your bundle size might be different from `next build` with webpack. This will be improved as we work towards stability.
- This build is without disk caching; subsequent builds will become faster when disk caching becomes available.
- When comparing output to webpack builds, make sure to first clear the Next.js cache by deleting the `.next` directory.
Provide feedback for Turbopack builds at https://github.com/vercel/next.js/discussions/77721
npm run build 22.58s user 3.21s system 237% cpu 10.879 total |
Beta Was this translation helpful? Give feedback.
-
Probably some unhandled cases in ![]() After investigating the reason, it is because dynamic imports in a route handler that referenced client components |
Beta Was this translation helpful? Give feedback.
-
It is a vast improvement from webpack. In Webpack it takes 10 mins to compile and with |
Beta Was this translation helpful? Give feedback.
-
Using Turbo with Reproduction: https://github.com/remcohaszing/turbo-markdown-error |
Beta Was this translation helpful? Give feedback.
-
Can we turn off Source maps manually? |
Beta Was this translation helpful? Give feedback.
-
We ran into two problems which directly crash the build (15.3.1-canary.8) Turbopack crashes with SWC plugins when using absolute paths in swcPlugins configuration #78156
SWC plugin context in Turbopack includes only basename instead of full path #78181
|
Beta Was this translation helpful? Give feedback.
-
first time build (which had yet to pass with current today build stats - (these are all vs. webpack and this is on the latest
anyone running turbopack in production yet? anything worth sharing on how that experience is |
Beta Was this translation helpful? Give feedback.
-
running in to this error at runtime. ⨯ Error: Failed to load external module sharp: Error: Could not load the "sharp" module using the linux-x64 runtime
Possible solutions:
- Ensure optional dependencies can be installed:
npm install --include=optional sharp
- Ensure your package manager supports multi-platform installation:
See https://sharp.pixelplumbing.com/install#cross-platform
- Add platform-specific dependencies:
npm install --os=linux --cpu=x64 sharp
- Consult the installation documentation:
See https://sharp.pixelplumbing.com/install
at Object.externalRequire [as x] (.next/server/chunks/ssr/[turbopack]_runtime.js:367:15)
at 601255 (.next/server/chunks/ssr/[root-of-the-server]__609f2935._.js:1:10388)
at instantiateModule (.next/server/chunks/ssr/[turbopack]_runtime.js:601:23)
at getOrInstantiateModuleFromParent (.next/server/chunks/ssr/[turbopack]_runtime.js:658:12)
at esmImport (.next/server/chunks/ssr/[turbopack]_runtime.js:132:20)
at <unknown> (.next/server/chunks/ssr/_05c98da8._.js:211:2947)
at asyncModule (.next/server/chunks/ssr/[turbopack]_runtime.js:299:5)
at 456539 (.next/server/chunks/ssr/_05c98da8._.js:211:2732)
at instantiateModule (.next/server/chunks/ssr/[turbopack]_runtime.js:601:23)
at getOrInstantiateModuleFromParent (.next/server/chunks/ssr/[turbopack]_runtime.js:658:12) { don't even have sharp as a dependency |
Beta Was this translation helpful? Give feedback.
-
I could see the entrie source code. |
Beta Was this translation helpful? Give feedback.
-
Added turbopack in pre-production to my nextjs 15.3.3 website (running on |
Beta Was this translation helpful? Give feedback.
-
I added turbopack to production for nextjs 15.3.3 project. Build time was reduced overall by ~50% (from 2 minutes to 1 minute) I dont use any webpack plugin or specific next configs. Very much looking forward to full optimization and release for production! |
Beta Was this translation helpful? Give feedback.
-
How far out on the roadmap is turbopack support for |
Beta Was this translation helpful? Give feedback.
-
Hello 👋 We've used turbopack for production builds for a month or so for a small project without many releases, but it seems we'll need to roll back to webpack. The issue:
This causes trouble for our users that:
The OLD The other (non-page) JS chunks seem to be correctly including the content hash in the file name, it's an issue with page chunks only. Looking at old issues and PRs, I think this was the main change in the webpack functionality: #14279 |
Beta Was this translation helpful? Give feedback.
-
I also think this affects the dev turbopack build. My client navigation was broken until I temporarily disabled cache in the DevTools Network tab and tried again. |
Beta Was this translation helpful? Give feedback.
-
Mysterious error: ⚠ The config property `experimental.turbo` is deprecated. Move this setting to `config.turbopack` as Turbopack is now stable.
▲ Next.js 15.4.0-canary.91 (Turbopack)
- Experiments (use with caution):
· turbo
· swcPlugins
✓ webpackBuildWorker
.....
> Build error occurred
Error: Turbopack build failed with 1 errors:
./packages/client/node_modules/next/dist/compiled/@vercel/nft/LICENSE:1:11
Parsing ecmascript source code failed
Expected ';', '}' or <eof>
at ./packages/client/node_modules/next/dist/compiled/ (vercel/nft/LICENSE:1:11) |
Beta Was this translation helpful? Give feedback.
-
I meet the caution when running the // Before
⚠ Webpack is configured while Turbopack is not, which may cause problems.
⚠ See instructions if you need to configure Turbopack:
https://nextjs.org/docs/app/api-reference/next-config-js/turbo Then I add the import type { NextConfig } from "next";
const nextConfig: NextConfig = {
turbopack: {
root: path.join(__dirname, "../.."),
},
}; However, there is another warning message when building. // After
⚠ Invalid next.config.ts options detected:
⚠ Unrecognized key(s) in object: 'root' at "turbopack"
⚠ See more info here: https://nextjs.org/docs/messages/invalid-next-config Is there anything wrong in my config?
|
Beta Was this translation helpful? Give feedback.
-
I add the // Before
Route (app) Size First Load JS
┌ ○ / 36.4 kB 228 kB
├ ○ /_not-found 981 B 103 kB
├ ƒ /[...rest] 183 B 102 kB
├ ○ /blog 2.28 kB 155 kB
├ ● /blog/[slug] 2.98 kB 150 kB
├ ├ /blog/hugo-s-go-to-stack-for-building-maintainable-software
├ ├ /blog/who-is-chun-ho-hugo-lin
├ └ /blog/three-methods-to-access-environment-variable-values-in-python
├ ○ /bookmarks 10.6 kB 121 kB
├ ○ /code-of-conduct 800 B 141 kB
├ ○ /contact 3.56 kB 149 kB
├ ○ /cv 183 B 102 kB
├ ○ /gallery 2.86 kB 146 kB
├ ○ /manifest 183 B 102 kB
├ ○ /manifest.webmanifest 183 B 102 kB
├ ○ /markdown-alerts 183 B 102 kB
├ ○ /md-cookbook 183 B 102 kB
├ ƒ /og 183 B 102 kB
├ ○ /og-image-generator 5.99 kB 122 kB
├ ○ /opengraph-image 183 B 102 kB
├ ƒ /portfolio 228 B 157 kB
├ ƒ /portfolio/[slug] 918 B 109 kB
├ ƒ /post 2.06 kB 158 kB
├ ƒ /post/[slug] 1.21 kB 112 kB
├ ○ /react-scroll-motion 2.57 kB 105 kB
├ ○ /remark 190 B 111 kB
├ ● /remark/posts/[slug] 205 B 111 kB
├ ├ /remark/posts/hugo-s-go-to-stack-for-building-maintainable-software
├ ├ /remark/posts/who-is-chun-ho-hugo-lin
├ └ /remark/posts/three-methods-to-access-environment-variable-values-in-python
├ ○ /resume 5.42 kB 148 kB
├ ○ /robots.txt 183 B 102 kB
├ ○ /rss 183 B 102 kB
├ ƒ /rss.xml 183 B 102 kB
├ ○ /sitemap.xml 183 B 102 kB
├ ○ /tag-selection-interaction 1.52 kB 150 kB
├ ○ /terms 800 B 141 kB
├ ○ /twitter-image 183 B 102 kB
└ ○ /web-vitals-dashboard 5.84 kB 116 kB
+ First Load JS shared by all 102 kB
├ chunks/3245-6ffc9e227344cedc.js 46.7 kB
├ chunks/411997fe-a3b6213a353fb7f5.js 53.2 kB
└ other shared chunks (total) 2.07 kB
○ (Static) prerendered as static content
● (SSG) prerendered as static HTML (uses generateStaticParams)
ƒ (Dynamic) server-rendered on demand // After
Route (app) Size First Load JS
┌ ○ / 38.5 kB 6.6 MB
├ ○ /_not-found 0 B 113 kB
├ ƒ /[...rest] 0 B 6.56 MB
├ ○ /blog 1.22 kB 6.56 MB
├ ● /blog/[slug] 1.63 kB 6.56 MB
├ ├ /blog/hugo-s-go-to-stack-for-building-maintainable-software
├ ├ /blog/who-is-chun-ho-hugo-lin
├ └ /blog/three-methods-to-access-environment-variable-values-in-python
├ ○ /bookmarks 13.2 kB 6.57 MB
├ ○ /code-of-conduct 0 B 6.56 MB
├ ○ /contact 7.26 kB 6.56 MB
├ ○ /cv 0 B 6.56 MB
├ ○ /gallery 0 B 6.56 MB
├ ○ /manifest 0 B 113 kB
├ ○ /manifest.webmanifest 0 B 113 kB
├ ○ /markdown-alerts 0 B 6.54 MB
├ ○ /md-cookbook 0 B 6.54 MB
├ ƒ /og 0 B 0 B
├ ○ /og-image-generator 5.87 kB 6.56 MB
├ ○ /opengraph-image 0 B 0 B
├ ƒ /portfolio 774 B 6.56 MB
├ ƒ /portfolio/[slug] 528 B 6.56 MB
├ ƒ /post 2.45 kB 6.56 MB
├ ƒ /post/[slug] 897 B 6.56 MB
├ ○ /react-scroll-motion 3.01 kB 6.55 MB
├ ○ /remark 0 B 6.54 MB
├ ● /remark/posts/[slug] 0 B 6.54 MB
├ ├ /remark/posts/hugo-s-go-to-stack-for-building-maintainable-software
├ ├ /remark/posts/who-is-chun-ho-hugo-lin
├ └ /remark/posts/three-methods-to-access-environment-variable-values-in-python
├ ○ /resume 2.65 kB 6.56 MB
├ ○ /robots.txt 0 B 0 B
├ ○ /rss 0 B 113 kB
├ ƒ /rss.xml 0 B 0 B
├ ○ /sitemap.xml 0 B 0 B
├ ○ /tag-selection-interaction 1.34 kB 6.55 MB
├ ○ /terms 0 B 6.56 MB
├ ○ /twitter-image 0 B 0 B
└ ○ /web-vitals-dashboard 5.92 kB 6.56 MB
+ First Load JS shared by all 113 kB
├ chunks/415231d4bbc0c6b2.js 61.4 kB
├ chunks/b633760b83ef6142.js 16.8 kB
├ chunks/f41c6cfd0ff938c0.js 18.8 kB
└ other shared chunks (total) 16.1 kB
○ (Static) prerendered as static content
● (SSG) prerendered as static HTML (uses generateStaticParams)
ƒ (Dynamic) server-rendered on demand |
Beta Was this translation helpful? Give feedback.
-
Turboapck does not automatically track the final path of symbolic links. As shown in the following error, [project]/apps/web/src/data/photos-manifest.json is a symbolic link, the address exists, but an error occurred.
|
Beta Was this translation helpful? Give feedback.
-
I am on next.js canary builds and getting this error running builds with turbopack enabled
files returning this error during build: |
Beta Was this translation helpful? Give feedback.
-
Unexpected transform to modern media query syntax |
Beta Was this translation helpful? Give feedback.
-
turbopack don't support |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Thread for posting feedback about
next build --turbopack
.Beta Was this translation helpful? Give feedback.
All reactions