Next 15 Error with Turbopack (Nextjs starter example)
Version: Deno 2.1.3 (Tried on multiple 2.X.X versions)
deno -A npm:create-next-app@latest nextjs-dashboard --example "https://github.com/vercel/next-learn/tree/main/dashboard/starter-example" runs ok
deno install --allow-scripts returns
Similar to closed issue #26742
error: Uncaught Error: spawnSync node-gyp ENOENT
at __node_internal_captureLargerStackTrace (ext:deno_node/internal/errors.ts:93:9)
at __node_internal_errnoException (ext:deno_node/internal/errors.ts:141:10)
at _createSpawnSyncError (ext:deno_node/internal/child_process.ts:685:17)
at new ChildProcess (ext:deno_node/internal/child_process.ts:287:13)
at Object.spawn (node:child_process:120:10)
at build (file:///home/vestatian/Desktop/Deployments/nextjs-dashboard/node_modules/.deno/[email protected]/node_modules/node-gyp-build/bin.js:32:8)
at preinstall (file:///home/vestatian/Desktop/Deployments/nextjs-dashboard/node_modules/.deno/[email protected]: failed to run scripts for packages: [email protected]
Then ok after I run deno install --allow-scripts again.
Issue comes with when I run deno run dev. This returns
Next.js
getServerError
node_modules/.deno/[email protected]/node_modules/next/src/client/components/react-dev-overlay/internal/helpers/node-stack-frames.ts (31:36)
getServerError
node_modules/.deno/[email protected]/node_modules/next/src/client/index.tsx (930:17)
Even more strangely, this error disappears if I delete the line import '@/app/ui/global.css'; from root layout (@/app/layout.tsx). This is code written by Vercel and works when running with Node + pnpm rather than Deno.
I'm also getting this error and need to install pnpm install @tailwindcss/postcss
I'm on Deno 2.1.7, and this still doesn't work. Next JS version: 15.1.6 (with React 19).
My best guess is that Turbopack was, well, not installed at all with deno install and then it became a ENOENT, since it cannot spawn the turbopack process (or load the library into node, which might also not be supported by deno)
I believe Turbopack works as of Deno 2.3.3. At least it works for me.
Im getting the same error using Deno 2.3.5