npm start不适用于Gulp js上的React应用程序

希望大家做得很好!

我已经开始在使用节点模块的Gulp环境上运行React.js App。

运行项目命令是npm startgulp watch

在那些npm start中会触发gulp watch,所以当我用npm start的时候得到某种节点模块的错误。 如果我使用gulp手表没有得到低于错误。

命令提示错误

C:\Users\ryangyeswar\Documents\Interserv>npm start 'CALL "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\\node_modules \npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external com mand, operable program or batch file. > react-starterify@0.0.4 start C:\Users\ryangyeswar\Documents\Interserv > gulp watch npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\ node_modules\\npm\\bin\\npm-cli.js" "start" npm ERR! node v4.8.4 npm ERR! npm v2.15.11 npm ERR! file C:\Users\ryangyeswar\AppData\Roaming\npm npm ERR! path C:\Users\ryangyeswar\AppData\Roaming\npm npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn C:\Users\ryangyeswar\AppData\Roaming\npm npm ERR! react-starterify@0.0.4 start: `gulp watch` npm ERR! spawn C:\Users\ryangyeswar\AppData\Roaming\npm ENOENT npm ERR! npm ERR! Failed at the react-starterify@0.0.4 start script 'gulp watch'. npm ERR! This is most likely a problem with the react-starterify package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! gulp watch npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs react-starterify npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm ERR! npm owner ls react-starterify npm ERR! There is likely additional logging output above. npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\ node_modules\\npm\\bin\\npm-cli.js" "start" npm ERR! node v4.8.4 npm ERR! npm v2.15.11 npm ERR! code ELIFECYCLE npm ERR! react-starterify@0.0.4 start: `gulp watch` npm ERR! Exit status -4058 npm ERR! npm ERR! Failed at the react-starterify@0.0.4 start script 'gulp watch'. npm ERR! This is most likely a problem with the react-starterify package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! gulp watch npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs react-starterify npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm ERR! npm owner ls react-starterify npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! C:\Users\ryangyeswar\Documents\Interserv\npm-debug.log 

2)检查npm版本同样的错误发生npm -v

npm命令错误

升级您的nodenpm版本。 首先使用npm uninstall卸载npm。 然后更新节点和npm。 请查看https://nodejs.org/en/获取机器的最新版本。 理想情况下,你应该使用高于3.x版本的6.x和npm的节点。 如果问题仍然存在,请从您的package.json共享npm start脚本。

希望能帮助到你!