Search code examples
reactjsnpmgithub-pagescreate-react-app

Problem while deploying `create-react-app` on github using `gh-pages`


I am getting below error while deploying an app created using create-react-app on github using gh-pages.

"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.

I have referred this link and this one.

Can anyone help me to figure out what exactly is the problem?

My github project link is - https://github.com/aagjalpankaj/react-text-echo

My package.json file is - https://github.com/aagjalpankaj/react-text-echo/blob/master/package.json


Solution

  • It's a bug in gh-pages 2.1.x downgrade gh-pages to version 2.0:

    npm install [email protected] --dev.