Reputation: 454
I would like to publish my first react app in GithubPages using Create-react-App.
I did exactly the same things like here is written, but I have got an error after I typed npm run deploy
:
C:\Users\Pawel\Desktop\newReact\iVideos\ivideos>npm run deploy
> [email protected] predeploy C:\Users\Pawel\Desktop\newReact\iVideos\ivideos
> npm run build
npm WARN invalid config loglevel="notice"
> [email protected] build C:\Users\Pawel\Desktop\newReact\iVideos\ivideos
> react-scripts build
Creating an optimized production build...
Compiled with warnings.
./src/components/itemList_videos.js
Line 11: img elements must have an alt prop, either with meaningful text, or
an empty string for decorative images jsx-a11y/alt-text
Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.
File sizes after gzip:
40.88 KB build\static\js\main.be3a99b4.js
19.51 KB build\static\css\main.85ee0fa3.css
The project was built assuming it is hosted at /ivideos/.
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://kendyl93.github.io/ivideos, run:
npm run deploy
Find out more about deployment here:
bit ly 2vY88Kr
> [email protected] deploy C:\Users\Pawel\Desktop\newReact\iVideos\ivideos
> gh-pages -d build
error: cannot spawn sh: No such file or directory
fatal: unable to fork
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 log
ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Pawel\AppData\Roaming\npm-cache\_logs\2018-08-08T18_05_29_
640Z-debug.log
C:\Users\Pawel\Desktop\newReact\iVideos\ivideos>
Here is my code of an App: GitHub
Upvotes: 0
Views: 785
Reputation: 173
I'm fairly sure that the issue is caused by the git ssh not being known by the system, this is how I got it to work in 3 simple steps.
export GIT_SSH=/c/Git/bin/ssh.exe
Upvotes: 2