Create-react-app: "gh-pages -d build" failed

Created on 29 Sep 2017  ·  16Comments  ·  Source: facebook/create-react-app

Is this a bug report?

YES.

Can you also reproduce the problem with npm 4.x?

YES.

Which terms did you search for in User Guide?

GitHub Pages.

Environment

  1. node -v: 6.x/8.x (I have tested two versions)
  2. npm -v: 4.x/5.x (I have tested two versions)
  3. npm ls react-scripts (if you haven’t ejected): [email protected]

Then, specify:

  1. Operating system: Windows_NT 10.0.14393

Steps to Reproduce

1、 git clone https://github.com/jerofree/ReactMusic.git
2、open node.js CLI
3、type command "cd ReactMusic", then "npm run deploy" (package.json has been prepared)

Expected Behavior

the project could be deployed to the github pages correctly.

Actual Behavior

"gh-pages -d build" can not work
nz 3ea8 uuf7yx r d1r3

Reproducible Demo

just follow the "Steps to Reproduce" , easily to reproduce. (be sure to use window 10 operating system)

question

Most helpful comment

Are you sure your remote is correct?

You can try to reset it:

$ git remote remove origin
$ git remote add origin https://github.com/jerofree/ReactMusic.git
$ git push -u origin master

Then try again.

All 16 comments

Do you have git installed?

yes, I have installed. It seems that it is node.js problem

ENOENT normally means it's missing, is it in your PATH?

Can you try to run just git from the command line, does that work?

I have configure "git" into PATH. I just type "git" in node.js command line, it does not work, It says "git" is
not internal or external command

So that's where the problem is, did you reboot? You normally need to reboot after adding git to your PATH; and to be specific it needs to be the path to the folder git is in, not the literal word git.

I have rebooted. but another issue emerged."Failed to get remote.origin.url (task must either be run in a git repository with a configured origin remote or must be configured with the "repo" option)",
I have set the "homepage" option in package.json file.

Are you sure your remote is correct?

You can try to reset it:

$ git remote remove origin
$ git remote add origin https://github.com/jerofree/ReactMusic.git
$ git push -u origin master

Then try again.

I run "npm run deploy" in "git bash" command line. It works. but it shows nothing when i visit

I have repaired that .I press F12 , cosole shows "Mixed Content: The page at 'https://jerofree.github.io/ReactMusic/' was loaded over HTTPS, but requested an insecure script 'http://www.jplayer.cn/demos/lib/jquery.min.js'. This request has been blocked; the content must be served over HTTPS."

You need to switch your URLs to their appropriate HTTPS counterpart. You cannot request insecure content over a HTTPS site.

for my email ,I did not receive this thread immediately,. I have change URLs to cdn https,but it can not load some resources,
GET https://jerofree.github.io/jerofree/ReactMusic/static/css/main.aa95bb57.css net::ERR_ABORTED
jerofree.github.io/:1
GET https://jerofree.github.io/jerofree/ReactMusic/static/js/main.d4784a28.js net::ERR_ABORTED
But the resource is there.

I have solved this. It works now. but still have some problems. https://jerofree.github.io/ReactMusic/

some content could not show.

@jerofree how do you solved that? i'm stuck at this part after npm run build.

you should check your configuration in detail depending on the document.

few seconds later i saw in package.json
"homepage" : "mydomain/react-test",
Adding "/build" at the end i solve my problem

Thanks 💯

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alleroux picture alleroux  ·  3Comments

alleroux picture alleroux  ·  3Comments

jnachtigall picture jnachtigall  ·  3Comments

onelson picture onelson  ·  3Comments

ap13p picture ap13p  ·  3Comments