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
Even if the repository is private, the site is still publicly available on the internet — so the developer should always check for any sensitive data before deployment. Naturally, sending sensitive data (e.g. passwords or credit card information) is also unsafe.
Solution: Verify the publishing source and published URL from your repository's settings tab. Double check that you are using the correct URL by visiting your repository's Settings, and scrolling down to the GitHub Pages section. You should see the URL where your site is published.
Published GitHub Pages sites may be no larger than 1 GB. GitHub Pages sites have a soft bandwidth limit of 100 GB per month.
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!
I also had this same problem on a fresh install of create-react-app
. I have no idea what the problem was, but I did the following:
gh-pages
from 2.1.0
to 2.0.1
npm run deploy
, manually run npm run build
then gh-pages -d build
from the commandline.At first, I'd get the same error in the commandline, even after checking that the version was downgraded to 2.0.1
, but for some reason it worked after manually creating the gh-pages
branch and pushing some files into it. As of now, npm run deploy
throws the error but at least gh-pages -d build
from the console works.
INSTALL/REINSTALL GIT Update NPM Reopen EDITOR
this solved my problem
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