I included all the steps for deploying my create react app on github. snippet of my 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"
},
this is the error i am getting
gh-pages -d build
"file" argument must be a non-empty string
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.
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
Got the same issue; this answer solved my problem: https://stackoverflow.com/a/57315930/11879312
"Seems like a bug in gh-pages 2.1. I solved mine by downgrading gh-pages to version 2.0: yarn add [email protected] -D or npm install [email protected] --dev."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With