npm运行hello world reactJS的部署时出错 [英] Error while npm run deploy of hello world reactJS
本文介绍了npm运行hello world reactJS的部署时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在npm运行部署后,我遇到上述错误在代码编辑器终端ERR中的错误日志:代码ELIFCYCLE
After npm run deploy i have errors like above Error log in the code editor terminal ERR: code ELIFCYCLE
'gh-pages' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hello-world-4@0.1.0 deploy: `npm run build&&gh-pages -d build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hello-world-4@0.1.0 deploy script 'npm run build&&gh-page
s -d build'.
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 hello-world-4 package
,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run build&&gh-pages -d build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs hello-world-4
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls hello-world-4
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\jan\AppData\Roaming\npm-cache\_logs\2017-05-12T17_55_00_56
9Z-debug.log
推荐答案
此错误是由于gh页未正确安装引起的.所以要清除,只需使用以下几行:-
this error is due to gh-pages not being installed properly. So to clear that just use the following lines:-
npm install --save gh-pages
所以现在只需再次尝试npm run deploy
So now just try once again npm run deploy
祝您编程愉快!
这篇关于npm运行hello world reactJS的部署时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文