-
Notifications
You must be signed in to change notification settings - Fork 26.2k
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
Cannot find module 'webpack/lib/RequestShortener' after npm|yarn install was run with NODE_ENV=production #4964
Comments
I'm expecting something is wrong in your lockfile. I can't reproduce this based on the issue description, so I'm going to close the issue. |
Been there, done that (regenerating the lock file), didn't help. Like others in #2339, I can only work around this by adding webpack to my own app's dependencies, and I should not have to. |
+1 Having same issue. Running
|
If it helps, I'll add my app's deps:
(of course, My lock file was generated fresh from these deps. |
+1 I am also having this issue @timneutkens |
Bug report
Related to #2339 but more specific.
The error:
Describe the bug
This error only happens when one runs
next build
after the app has been installed ([npm|yarn] install
) in an environment that hasNODE_ENV
set toproduction
.To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
NODE_ENV=production
npm|yarn install
next build
Expected behavior
No error, build completes successfully.
System information
Additional context
Not sure whether the bug could be with Next or
friendly-errors-webpack-plugin
.Workaround
I am working around this bug by simply adding
webpack
to my app's dependencies (not devDeps). But I shouldn't have to.The text was updated successfully, but these errors were encountered: