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

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

我有一个灵活的项目,在我删除 node_modules 中的所有文件并使用 npm install -d 重新安装后,当我尝试使用 运行 和 npm run dev 时出现这些错误] 即 node webpack-dev-server.js & PORT=3001 nodemon start.js -e js,jsx。在我重新安装依赖项之前,该应用程序运行良好。

这是灵活的模板项目

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

是什么导致了这些错误,我该如何诊断?为什么它一开始可以工作,然后在我重新安装节点模块时就停止工作了?

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

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

我认为这是一个已知问题。您可以随时返回到以前的版本。