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