0

unfortunately I cannot deploy on GitHub my Color-recognition App in React JS on GitHub pages. I am using Webpack as bundler.

My system configuration is: 
Webpack
Environment:
OS: Windows 10
Node: 8.12.0
Yarn: Not Found
npm: 6.4.1
Watchman: Not Found
Xcode: N/A
Android Studio: Not Found
Packages: (wanted => installed)
react: ^16.5.2 => 16.5.2
react-dom: ^16.5.2 => 16.5.2
react-scripts: 1.1.5 => 1.1.5

I use extra added dependencies of Clarifai and Gsap and used the following steps:

  1. I created on my Github account the repository Color-recognition without md file, and within added gh-pages branch, and in setting of repository under Source added gh-pages branch.

  2. git add .

  3. git commit -m "Uploading files"

  4. git push -f origin master:gh-pages

  5. git remote add origin https://github.com/Geeeva/Color-recognition.git npm run deploy

The page should be deployed but it couldn't, with the error below. I wanted to put the project demo that is visible. Tried the same procedure with the master branch of the Color-recognition, and I got the same error.

The error is following:

Cannot read property 'email' of null
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\Ivana\AppData\Roaming\npm-cache_logs\2018-09-19T19_58_34_ 829Z-debug.log

Link to my Github repo is: https://github.com/Geeeva/Color-recognition

7
  • i have deployed it succesfully using your codebase here is the link for app:-shivasai09.github.io/color and link for repo:- github.com/shivasai09/color/blob/master/public/index.html#L28 Commented Sep 20, 2018 at 11:11
  • You did all the same steps I stated above with no error? Commented Sep 20, 2018 at 11:18
  • no, i have cloned your repo and changed the url to my git repo and then i force pushed the code to master and after that i have created a branch named gh-pages by taking master as base, in the github UI and made sure that gh-pages branch is used in the settings and then ran the code npm run deploy.. Commented Sep 20, 2018 at 12:02
  • also changed the package.json, please see my repo Commented Sep 20, 2018 at 12:03
  • what changes have you done in package.json, i cannot spot it? Commented Sep 20, 2018 at 12:36

1 Answer 1

0

I managed to fix it by setting my git config user name and email. (As the link provided above specifies the need of both).

So just write in the terminal:

git config --global user.name your name

git config --global user.email @youremail

source: https://www.reddit.com/r/reactjs/comments/9hlin1/unable_to_deploy_react_app_to_github_pages/

Sign up to request clarification or add additional context in comments.

Comments

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.