New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jest-worker 27.4.0 breaks webpack builds with node options #14859
Comments
Temporary workaround - install jest-worker@27.3.* by hand. Then webpack production builds with node options works as usually.
But I think it's up to webpack developers fix erroneous dependency. Or create issue on jest. |
I can confirm this broke our pipelines today. We fixed it with the workaround from @MirKml. |
Fixed https://github.com/facebook/jest/releases/tag/v27.4.1, please update jest |
after this fix has been moved , I m getting this error (from 29th Nov) |
I tried latest jest, did not fix the issue. |
suggested workaround did not work either. getting this:
|
running the command via yarn script:
|
In mentioned jest PR which fixed issue, there is discussion about underscores, dashes. Maybe it helps you. My mentioned node option --max_old_space_size is fixed. |
Even time when you write - |
@alexander-akait @JonWalsten I've checked the code of worker after the fix and it seems that you are filtering v8 node options only for max_old_space_size (max-old-space-size). But it seems other options are causing the same issue.
https://nodejs.org/api/worker_threads.html#new-workerfilename-options And there is a very long list of such options. |
Please open an issue in |
They are already working on it |
This was causing downstream projects like prettier-synchronized to break when encountering V8 options like `--max-old-space-size`. The option itself shouldn't be needed since execArgv values are inherited from the parent thread by default. See: https://nodejs.org/api/worker_threads.html#new-workerfilename-options Related: webpack/webpack#14859
Bug report
When latest webpack is used with latest jest - 27.4.0, it breaks production builds with custom node options. e.g.
node --max_old_space_size=2768 node_modules/webpack-cli/bin/cli.js --mode production
Result is
Problem is with latest jest-worker.
There is installed tree with npm
If the current behavior is a bug, please provide the steps to reproduce.
Install latest webpack with latest jest
Use some simple webpack config which utilizes production build. I can try it later for minimal setup if necessary.
What is the expected behavior?
Production builds work as expected. Lowering jest-worker dependency can be solution.
Other relevant information:
webpack version: 5.64.4
Node.js version: 16.13.0
Operating System: Windows, Linux
Additional tools: jest@27.4.0
The text was updated successfully, but these errors were encountered: