请问如下错误如何处理?
> react_webpack_test@1.0.0 build /Users/caochun/WebstormProjects/cs/react_webpack_test
> webpack --progress --profile --colors
module.js:341
throw err;
^
Error: Cannot find module 'webpack'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (/Users/caochun/WebstormProjects/cs/react_webpack_test/webpack.config.js:1:75)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
npm ERR! Darwin 16.3.0
npm ERR! argv "/Users/caochun/.nvm/versions/node/v5.9.1/bin/node" "/Users/caochun/.nvm/versions/node/v5.9.1/bin/npm" "run" "build"
npm ERR! node v5.9.1
npm ERR! npm v3.7.3
npm ERR! code ELIFECYCLE
npm ERR! react_webpack_test@1.0.0 build: `webpack --progress --profile --colors`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react_webpack_test@1.0.0 build script 'webpack --progress --profile --colors'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the react_webpack_test package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack --progress --profile --colors
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs react_webpack_test
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls react_webpack_test
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! Please include the following file with any support request:
npm ERR! /Users/caochun/WebstormProjects/cs/react_webpack_test/npm-debug.log
搭建Amazeui+react+webpack+webstorm开发环境源起 最近在学习Amazeui-react的开发,发现react着实是一个好东西,但是蛋疼的是webpack这个东西好难配置,稍不注意就会导致自动编译失败,会出现一堆的问题,...