deno icon indicating copy to clipboard operation
deno copied to clipboard

Next 15 dev mode error with turbopack

Open littledivy opened this issue 1 year ago • 1 comments

[divy@divy test-app-15]$ DENO_FUTURE=1 deno task dev
Task dev next dev --turbo
  ▲ Next.js 14.3.0-canary.73 (turbo)
  - Local:        http://localhost:3000

 ✓ Starting...
 ✓ Ready in 1060ms
 ○ Compiling / ...
(node:140012) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:140019) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
 ✓ Compiled / in 1470ms
 ⨯ TypeError: Cannot read properties of undefined (reading 'bold')
    at getDefs (file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/babel/bundle.js:1848:5496)
    at highlight (file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/babel/bundle.js:1848:6631)
    at codeFrameColumns (file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/babel/bundle.js:1:76357)
    at formatIssue (file:///home/divy/gh/test-app-15/node_modules/next/dist/server/dev/turbopack-utils.js:198:20)
    at processIssues (file:///home/divy/gh/test-app-15/node_modules/next/dist/server/dev/turbopack-utils.js:241:27)
    at handleRouteType (file:///home/divy/gh/test-app-15/node_modules/next/dist/server/dev/turbopack-utils.js:408:17)
    at eventLoopTick (ext:core/01_core.js:168:7)
    at async Object.ensurePage (file:///home/divy/gh/test-app-15/node_modules/next/dist/server/dev/hot-reloader-turbopack.js:648:17)
    at async DevBundlerService.ensurePage (file:///home/divy/gh/test-app-15/node_modules/next/dist/server/lib/dev-bundler-service.js:18:20)
    at async DevServer.ensurePage (file:///home/divy/gh/test-app-15/node_modules/next/dist/server/dev/next-dev-server.js:550:9)
    at async Object.ensure (file:///home/divy/gh/test-app-15/node_modules/next/dist/server/dev/next-dev-server.js:169:17)
    at async DevRouteMatcherManager.matchAll (file:///home/divy/gh/test-app-15/node_modules/next/dist/server/future/route-matcher-managers/dev-route-matcher-manager.js:96:13)
    at async DevRouteMatcherManager.match (file:///home/divy/gh/test-app-15/node_modules/next/dist/server/future/route-matcher-managers/default-route-matcher-manager.js:155:26)
    at async DevServer.NextNodeServer.handleCatchallRenderRequest (file:///home/divy/gh/test-app-15/node_modules/next/dist/server/next-server.js:229:31)
    at async DevServer.handleRequestImpl (file:///home/divy/gh/test-app-15/node_modules/next/dist/server/base-server.js:804:17)
    at async file:///home/divy/gh/test-app-15/node_modules/next/dist/server/dev/next-dev-server.js:339:20
    at async Span.traceAsyncFn (file:///home/divy/gh/test-app-15/node_modules/next/dist/trace/trace.js:157:20)
    at async DevServer.handleRequest (file:///home/divy/gh/test-app-15/node_modules/next/dist/server/dev/next-dev-server.js:336:24)
    at async invokeRender (file:///home/divy/gh/test-app-15/node_modules/next/dist/server/lib/router-server.js:175:21)
    at async handleRequest (file:///home/divy/gh/test-app-15/node_modules/next/dist/server/lib/router-server.js:354:24)
    at async requestHandlerImpl (file:///home/divy/gh/test-app-15/node_modules/next/dist/server/lib/router-server.js:378:13)
    at async ServerImpl.requestListener (file:///home/divy/gh/test-app-15/node_modules/next/dist/server/lib/start-server.js:142:13)

littledivy avatar May 22 '24 15:05 littledivy

Do it work if you run with --unstable-unsafe-proto?

bartlomieju avatar May 22 '24 15:05 bartlomieju

Yes, that fixes the original error. Now I get another one:

divy@divy test-app-15]$ deno task dev
Task dev next dev --turbo
  ▲ Next.js 14.3.0-canary.73 (turbo)
  - Local:        http://localhost:3000

 ✓ Starting...
 ✓ Ready in 1832ms
 ○ Compiling / ...
(node:149677) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:149684) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
 ✓ Compiled / in 1478ms
 ⨯ Error: Invariant: Missing ActionQueueContext
    at useReducerWithReduxDevtoolsImpl (/home/divy/gh/test-app-15/.next/server/chunks/ssr/node_modules_fad749._.js:4438:15)
    at Router (/home/divy/gh/test-app-15/.next/server/chunks/ssr/node_modules_fad749._.js:14548:273)
    at cb (ext:deno_node/internal/timers.mjs:64:31)
    at eventLoopTick (ext:core/01_core.js:203:13)
digest: "4219805756"
Error: Invariant: Missing ActionQueueContext
    at useReducerWithReduxDevtoolsImpl (file:///home/divy/gh/test-app-15/.next/server/chunks/ssr/node_modules_fad749._.js:4438:15)
    at Router (file:///home/divy/gh/test-app-15/.next/server/chunks/ssr/node_modules_fad749._.js:14548:273)
    at o8 (file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:10724)
    at file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:20994
    at ao (file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:21722)
    at ai (file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:55125)
    at ao (file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:20594)
    at ai (file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:55125)
    at an (file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:11210)
    at file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:21685
    at ao (file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:21722)
    at ai (file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:55125)
    at an (file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:11210)
    at file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:21685
    at ao (file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:21722)
    at ao (file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:51821)
    at ai (file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:55125)
    at an (file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:11210)
    at file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:21685
    at ao (file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:21722)
    at ai (file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:55125)
    at file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:64092
    at file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:64821
    at ag (file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:64829)
    at Timeout._onTimeout (file:///home/divy/gh/test-app-15/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:6918)
    at cb (ext:deno_node/internal/timers.mjs:64:31)
    at eventLoopTick (ext:core/01_core.js:203:13)

littledivy avatar May 22 '24 18:05 littledivy

Oh never mind, it works! (I wasn't using DENO_FUTURE=1 which removes window global)

image

littledivy avatar May 22 '24 18:05 littledivy