question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Next 9] Web worker broken

See original GitHub issue

After several hours, still no success. Next 8 was ok. I created this issue to track investigations.

@app/web
 | > Using external babel configuration
 | > Location: "/Users/steida/dev/nberg/packages/web/babel.config.js"
 | [ info ]  bundled successfully, waiting for typecheck results ...
 | [ wait ]  compiling ...
 | [ info ]  bundled successfully, waiting for typecheck results ...
 | [ ready ] compiled successfully - ready on http://localhost:3000
 | [ event ] build page: /
 | [ wait ]  compiling ...
 | [ info ]  bundled successfully, waiting for typecheck results ...
 | [ ready ] compiled successfully - ready on http://localhost:3000
 | { Error: Cannot find module '/Users/steida/dev/nberg/packages/web/.next/server/static/development/pages/_document'
 |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
 |     at Function.Module._load (internal/modules/cjs/loader.js:508:25)
 |     at Module.require (internal/modules/cjs/loader.js:637:17)
 |     at require (internal/modules/cjs/helpers.js:22:18)
 |     at Object.loadComponents (/Users/steida/dev/nberg/node_modules/next-server/dist/server/load-components.js:17:25)
 |     at DevServer.findPageComponents (/Users/steida/dev/nberg/node_modules/next-server/dist/server/next-server.js:298:40)
 |     at DevServer.renderToHTML (/Users/steida/dev/nberg/node_modules/next-server/dist/server/next-server.js:313:21)
 |     at DevServer.renderToHTML (/Users/steida/dev/nberg/node_modules/next/dist/server/next-dev-server.js:16:198)
 |     at process._tickCallback (internal/process/next_tick.js:68:7) code: 'MODULE_NOT_FOUND' }
 | [ event ] build page: /next/dist/pages/_error
 | [ wait ]  compiling ...
 | [ ready ] compiled successfully - ready on http://localhost:3000
 | [ error ] { Error: Cannot find module '/Users/steida/dev/nberg/packages/web/.next/server/static/development/pages/_document'
 |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
 |     at Function.Module._load (internal/modules/cjs/loader.js:508:25)
 |     at Module.require (internal/modules/cjs/loader.js:637:17)
 |     at require (internal/modules/cjs/helpers.js:22:18)
 |     at Object.loadComponents (/Users/steida/dev/nberg/node_modules/next-server/dist/server/load-components.js:17:25)
 |     at DevServer.findPageComponents (/Users/steida/dev/nberg/node_modules/next-server/dist/server/next-server.js:298:40)
 |     at DevServer.renderErrorToHTML (/Users/steida/dev/nberg/node_modules/next-server/dist/server/next-server.js:362:35)
 |     at DevServer.renderErrorToHTML (/Users/steida/dev/nberg/node_modules/next/dist/server/next-dev-server.js:16:706)
 |     at process._tickCallback (internal/process/next_tick.js:68:7) code: 'MODULE_NOT_FOUND' }
 | { Error: Cannot find module '/Users/steida/dev/nberg/packages/web/.next/server/static/development/pages/_document'
 |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
 |     at Function.Module._load (internal/modules/cjs/loader.js:508:25)
 |     at Module.require (internal/modules/cjs/loader.js:637:17)
 |     at require (internal/modules/cjs/helpers.js:22:18)
 |     at Object.loadComponents (/Users/steida/dev/nberg/node_modules/next-server/dist/server/load-components.js:17:25)
 |     at DevServer.findPageComponents (/Users/steida/dev/nberg/node_modules/next-server/dist/server/next-server.js:298:40)
 |     at DevServer.renderErrorToHTML (/Users/steida/dev/nberg/node_modules/next-server/dist/server/next-server.js:362:35)
 |     at DevServer.renderErrorToHTML (/Users/steida/dev/nberg/node_modules/next/dist/server/next-dev-server.js:16:839)
 |     at process._tickCallback (internal/process/next_tick.js:68:7) code: 'MODULE_NOT_FOUND' }

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
tky5622commented, Jan 23, 2020

This issue still seems to exist in next v9.2.

0reactions
balazsorban44commented, Jan 30, 2022

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Worker is not defined, in NEXT JS 9+ · Issue #10899 - GitHub
When trying to use web-workers using NEXT 9.1.1 and higher, the build is failing. Sometimes the dev build is throwing the error "Window...
Read more >
Web workers, React, and TypeScript - LogRocket Blog
In this article, we will learn about web workers and how to use them in a React and TypeScript project by building a...
Read more >
Next.js With Web Worker Example - StackBlitz
This example shows how to run code in. WebWorkers by utilizing [webpack 5](https:// nextjs.org/docs/messages/webpack5). ## Deploy your own.
Read more >
The State Of Web Workers In 2021 - Smashing Magazine
The underlying principle is the same: To give the browser a chance to ship the next frame you break up the work your...
Read more >
Chrome can't load web worker - Stack Overflow
Chrome doesn't let you load web workers when running scripts from a local file.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found