2017-08-17 60 views
1

我已經開始對咕嘟咕嘟環境中運行的應用程序React.js使用節點模塊工作。NPM開始不工作對應用做出反應咕嘟咕嘟JS

要運行該項目命令是npm startgulp手錶

在這些NPM啓動將觸發一飲而盡手錶,所以當我用故宮開始得到某種節點模塊錯誤的。如果我使用gulp手錶沒有得到低於錯誤。

Command Prompt Error

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. 

> [email protected] 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! [email protected] start: `gulp watch` 
npm ERR! spawn C:\Users\ryangyeswar\AppData\Roaming\npm ENOENT 
npm ERR! 
npm ERR! Failed at the [email protected] 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! [email protected] start: `gulp watch` 
npm ERR! Exit status -4058 
npm ERR! 
npm ERR! Failed at the [email protected] 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 command error

回答

0

升級node & npm版本。使用npm uninstall先卸載NPM。然後更新節點和npm。檢查https://nodejs.org/en/的最新版本爲您的機器。理想情況下,您應該在3.x版本之上使用高於6.x和npm的節點。如果問題仍然存在,請從你的package.json共享NPM啓動腳本。

希望它有幫助!

+0

其實我的項目已經在節點4版開發的,它會運行只在environment.so我安裝4.8.4 –

+0

您可以重新啓動系統,這樣的環境變量路徑設置正確的情況下,其尚未與嘗試! –

+0

完成同樣的錯誤。 –