【问题标题】:Facing issue with react- after npm start在 npm start 之后面临 react- 问题
【发布时间】:2017-09-19 10:59:05
【问题描述】:
learnreact@1.0.0 start C:\Users\Vaibhav\Desktop\reactApp
webpack-dev-server

'webpack-dev-server' is not recognized as an internal or external command, operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! learnreact@1.0.0 start: `webpack-dev-server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the learnreact@1.0.0 start script 'webpack-dev-server'.
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 learnreact package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack-dev-server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs learnreact
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls learnreact
npm ERR! There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Vaibhav\AppData\Roaming\npm-cache\_logs\2017-04-22T13_06_29_371Z-debug.log

【问题讨论】:

标签: reactjs npm webpack webpack-dev-server webpack-2


【解决方案1】:

如果你已经安装了,可执行文件在 node_modules/.bin 下 你可以使用

./node_modules/.bin/webpack-dev-server

$(npm bin)/webpack-dev-server

【讨论】:

  • 如果已安装,并且可执行文件位于 ./node_modules/.bin 下,则添加完整路径是没有意义的,因为 npm start(和所有 npm 脚本)已经在路径上提供了 ./node_modules/.bin
猜你喜欢
  • 2022-01-20
  • 2020-06-05
  • 1970-01-01
  • 2021-01-03
  • 2021-04-17
  • 2020-03-26
  • 2020-11-21
  • 2022-06-10
  • 2021-09-26
相关资源
最近更新 更多