Reputation: 23
I tried to deploy a react app to GitHub pages...
Commands on package.json:
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
and received this error:
The "file" argument must be of type string. Received type undefined
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.
It was supposed to deploy.
Upvotes: 2
Views: 167
Reputation: 183
I've resolved mine. Newer version 2.1 has some issue. Revert back to 2.0.1.
npm uninstall gh-pages
npm i [email protected]
npm run deploy // as usual
Hope that helped. :)
Upvotes: 1