0

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

3
  • 1
    Please include your error in text format instead of an image. Commented Aug 8, 2018 at 18:18
  • Looks like what you're doing is expecting something other than Windows or y our git is weird or... In any case, searching the web turns up several things you could try. Commented Aug 8, 2018 at 18:24
  • I was researching the web but in every case I got the same error. I am new to react, node and etc. thats why I am asking here for help. Thought it is a simple issue to solve... :( Commented Aug 8, 2018 at 18:29

1 Answer 1

2

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.

  1. Uninstall Git
  2. Reinstall it to C:/Git
  3. Run export GIT_SSH=/c/Git/bin/ssh.exe
Sign up to request clarification or add additional context in comments.

2 Comments

There is something wrong again. I see my github Page propetly but when I am on incognito in chrome I only see the read me file from create-react-app. What can be wrong ?
I have solved it already. I have change GitHub Pages options in Setting tab to 'gh-pages Branch'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.