Search code examples
npmwebpackwebpack-dev-serverfluxible

Getting webpack error "Module not found: Error: Cannot resolve module" in fluxible after re-installing node_modules


I have a fluxible project and I'm getting these errors after I deleted all files in node_modules and reinstalled with npm install -d when I try to run with npm run dev which is node webpack-dev-server.js & PORT=3001 nodemon start.js -e js,jsx. The app was working fine until I reinstalled dependencies.

Here's the fluxible template project

https://github.com/yahoo/generator-fluxible

What is causing these errors and how can I diagnose? Why did it work initially and then stopped working when I reinstalled node modules?

ERROR in ./client.js
Module not found: Error: Cannot resolve module 'node_modules/webpack/buildin/module.js' in /Projects/myproject
 @ ./client.js 1:0-49

ERROR in ./app.js
Module not found: Error: Cannot resolve module 'node_modules/webpack/buildin/module.js' in /Projects/myproject
 @ ./app.js 1:0-49

Solution

  • https://github.com/hapijs/qs/issues/128

    I think it is a know issue. You can always go back to a previous version.