0
我从来没有用过gh-pages,所以我对它的工作原理感到困惑。我跟着this guide了如何部署您的应用程序的Git枢纽的创建作出反应的应用程序页面上,但是每次我试图我得到一个错误:创建React应用程序和Git Hub页面
> gh-pages -d build
events.js:160
throw er; // Unhandled 'error' event
^
Error: spawn git ENOENT
at exports._errnoException (util.js:1018:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:390:7)
at startup (bootstrap_node.js:150:9)
at bootstrap_node.js:505:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] deploy: `gh-pages -d build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
我不知道这意味着什么或如何解决它。
建立你的'master'分支,然后将资产复制到'gh-pages'分支。 'gh-pages'只是一个静态网站,所以它只是想要你的HTML和JS。 – lux