Ad

Receive Error When Deploy To GitHub Pages

I'm deploy react app to git hub pages and receive error. File sizes after gzip:

68.67 KB  build\static\js\2.c2c334ae.chunk.js
 2.98 KB  build\static\js\main.8a72b1a2.chunk.js
  774 B   build\static\js\runtime~main.8f8a00a4.js

The project was built assuming it is hosted at /sort-customers-list/. You can control this with the homepage field in your package.json.

The build folder is ready to be deployed. To publish it at https://sejob.github.io/sort-customers-list, run: npm run deploy

Find out more about deployment here:

[email protected] deploy 
C:\Users\SeJo\Documents\Code\DEV_HW\sort-customers-list
gh-pages -d build

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.
npm ERR! A complete log of this run can be found in:
npm ERR!    
C:\Users\SeJo\AppData\Roaming\npm-cache\_logs\2019-08-01T12_09_52_445Z-debug.log
Ad

Answer

The problem occurs in the new version of GitHub pages. Just use this command to install the previous version of GitHub pages:

npm install [email protected]

Hope it will help!

Ad
source: stackoverflow.com
Ad