我包括了在 github 上部署我的 create react 应用程序的所有步骤。我的 package.json 的片段
"scripts": {
"start": "node scripts/start.js",
"build": "node scripts/build.js",`enter code here`
"test": "node scripts/test.js",
"homepage": "http://myName.github.io/create-react-wars",
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
},
这是我得到的错误
gh-pages -d build
"file" argument must be a non-empty string
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-star-wars@0.1.0 deploy: `gh-pages -d build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-star-wars@0.1.0 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Jishu\AppData\Roaming\npm-cache\_logs\2019-08-02T17_13_43_435Z-debug.log