DEV Community

Discussion on: How to deploy React App to GitHub Pages

Collapse
 
erfanmashari profile image
erfanmashari

hello and thanks for tutorial
i have problem when i run deploy and i get this error and it's not published

Creating an optimized production build...
Compiled successfully.

File sizes after gzip:

41.33 KB build\static\js\2.be6fabde.chunk.js
1.62 KB build\static\js\3.335c5c5e.chunk.js
1.18 KB build\static\js\runtime-main.81677a80.js
588 B build\static\js\main.d0ad4d5b.chunk.js
556 B build\static\css\main.a617e044.chunk.css

The project was built assuming it is hosted at /erfanmashari/digikala.git/.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.

Find out more about deployment here:

cra.link/deployment

digikala@0.1.0 deploy D:\Programming\Projcts\digikala
gh-pages -d build

fatal: A branch named 'gh-pages' already exists.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! digikala@0.1.0 deploy: gh-pages -d build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the digikala@0.1.0 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\ghaem\AppData\Roaming\npm-cache_logs\2021-10-27T09_58_01_094Z-debug.log

what should i do?
my repo url: github.com/erfanmashari/digikala