Skip to content
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

Error: Cannot find module 'webpack' on production environment #254

Open
rbudiharso opened this issue Oct 25, 2016 · 1 comment
Open

Error: Cannot find module 'webpack' on production environment #254

rbudiharso opened this issue Oct 25, 2016 · 1 comment
Labels
discussion V2.6.0 Webpack update V4
Milestone

Comments

@rbudiharso
Copy link

rbudiharso commented Oct 25, 2016

Why is it webpack needed for production environment even after I build for production? Steps to reproduce:

  1. mern init foo
  2. cd foo
  3. npm install
  4. npm start // => runs OK
  5. npm run build
  6. npm run build:server
  7. rm -rf node_modules
  8. npm install --production
  9. npm run start:prod
  10. error
    screenshot from 2016-10-25 09-17-24

I believe those are the steps to deploy in production mode and npm install --production is what we should do, but that render the app unusable. If that's not the case then webpack and its plugins should be in dependencies and not in devDependencies in package.json.

@0x7aF777
Copy link

Same issue found, anyone could help?

@mannyhenri mannyhenri added the V2.6.0 Webpack update V4 label Jun 2, 2018
@mannyhenri mannyhenri added this to the 2.6.0 milestone Jun 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion V2.6.0 Webpack update V4
Projects
None yet
Development

No branches or pull requests

3 participants