webpack配置react.js问题npm ERR!

http://www.cnblogs.com/xiaosh...
按照这个步奏来的为什么报错?求解答,跪求
clipboard.png


E:\WS\react_webpack_test>npm run build

> react_webpack_test@1.0.0 build E:\WS\react_webpack_test
> webpack --progress --profile --colors

'webpack' 不不是是内内部部或或外外部部命命令令,,也也不不是是可可运运行行的的程程序序
或或批批处处理理文文件件。。

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "D:\\Program Files(x86)\\node.exe" "D:\\Program Files (x86)\\nodejs\\node_global\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v6.4.0
npm ERR! npm  v3.10.9
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!     E:\WS\react_webpack_test\npm-debug.log

E:\WS\react_webpack_test>
阅读 7.2k
1 个回答

如果要直接用 webpack 命令,除了在项目中安装webpack,还要安装全局webpack
命令如下:

npm install webpack -g
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题