Endless issues of Error: Cannot find module '....\.next\server\vendor-chunks\lib\worker.js' #68950
Labels
bug
Issue was opened via the bug report template.
Output (export/standalone)
Related to the the output option in `next.config.js`.
Webpack
Related to Webpack with Next.js.
Link to the code that reproduces this issue
https://github.com/jdoe802/pino-pretty-mongo-minimal
To Reproduce
have been working on this for a few weeks now. I was getting errors like the following when trying to implement pino transport
this originally seemed to be fixed with the following workaround being added to the next.config file: (the worker.js file, indexes file, and wait file were all copied from /node_modules/thread-stream/ folder)
however after further inspection some logs were outputting correctly with pino transport and others were causing this message
The logging transport that is triggering all these issues:
I've tried multiple solutions (commented out in the repo) Overall it is logging in some places but not in others in my full code repo. It logs to console in all files when I don't add the transport streams. After adding the transport streams and multiple workarounds, getting this. If next could just update their files so that worker.js was properly found in the first place many issues would be avoided.
Current vs. Expected behavior
I expected the logging to work without throwing worker.js related issues
Provide environment information
Which area(s) are affected? (Select all that apply)
Output (export/standalone), Webpack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
This issue is happening locally .
The text was updated successfully, but these errors were encountered: