Cannot find module 'webpack/lib/node/NodeTemplatePlugin”问题
2017-06-30 10:49
656 查看
up vote down voteaccepted | Node requires you to install webpack to your project. You have 2 options to solve the above: Remove global webpack and install it locally npm uninstall -g webpack npm install --save-dev html-webpack-plugin webpack webpack-dev-server You can link the global webpack pkg to your project's node modules. The downside of this is that your project will be forced to use most updated webpack. This will create a problem only when some updates are not backwards compatible. npm i webpack -g; npm link webpack --save-dev You can omit the html-webpack-plugin depending on your requirement. You can find more info here: https://github.com/webpack/webpack/issues/2131 我选择的是第二种 |
相关文章推荐
- “Cannot find module 'webpack/lib/node/NodeTemplatePlugin”问题
- “Cannot find module 'webpack/lib/node/NodeTemplatePlugin”问题
- Error: Cannot find module 'webpack/lib/node/NodeTemplatePlugin' 【Webpack错误】
- moudule.js:338 throw err; Error: Cannot find module 'webpack/lib/node/NodeTemplatePlugin'
- ng serve报错 Cannot find module 'webpack/lib/node/NodeTemplatePlugin'
- moudule.js:338 throw err; Error: Cannot find module 'webpack/lib/node/NodeTemplatePlugin'
- Error: Cannot find module 'webpack/lib/node/NodeTemplatePlugin'
- annot find module 'webpack/lib/node/NodeTemplatePlugin'问题的解决办法
- 关于webpack项目中报错:Error: Cannot find module 'webpack/lib/node/NodeTemplatePlugin' 的解决办法
- 'webpack/lib/node/NodeTemplatePlugin' 错误解决
- electron-store在webpack打包中的Cannot find module "." 问题
- 【node-sass】 Module build failed: Error: ENOENT: no such file or directory, scandir 'C:\Users\lizhaohong\Desktop\testwebpack\node_modules\.4.7.2@node-sass\vendor'
- Cannot find module -----Node.js编程的第一个问题
- React+Webpack, Module not found: Error: Cannot resolve module问题解决
- node.js项目的Cannot find module ‘xxx’问题
- Node.js Cannot find module 'xxx' 有关问题解决
- Node.js Cannot find module 'xxx' 问题解决
- Error: Cannot find module 'webpack-merge'
- Node.js Cannot find Module xxx 的问题
- react injectTapEventPlugin.js:23 Uncaught Error: Cannot find module "react/lib/EventPluginHub"