React on Github Pages: gh-pages package not workinggh-pages failing while trying to deploy Reactjs app to GitHub in windows 10Loop inside React JSXProgrammatically navigate using react routerDeploying react app to github pagesReact website not deploying to GitHub Pagesdeploying create-react-app to gh-pagesErrors running NPM commands after posting React app to github pages.How to deploy create-react-app to github pages? getting “fatal: Could not read from remote repository.”Getting blank page after react app publish in githubError While Deploying React application on serverLosing settings for personal domain on GitHub after deploy React app
Placing bypass capacitors after VCC reaches the IC
Is it possible to play as a necromancer skeleton?
How many chess players are over 2500 Elo?
Command to Search for Filenames Exceeding 143 Characters?
Why are C64 games inconsistent with which joystick port they use?
If a person had control of every single cell of their body, would they be able to transform into another creature?
Is the first derivative operation on a signal a causal system?
Identify this in soil?
Ticket sales for Queen at the Live Aid
Would jet fuel for an F-16 or F-35 be producible during WW2?
Crossing US border with music files I'm legally allowed to possess
A Python Blackjack terminal based game
Why do airplanes use an axial flow jet engine instead of a more compact centrifugal jet engine?
Should I disclose a colleague's illness (that I should not know about) when others badmouth him
How strong are Wi-Fi signals?
Is there a way to make it so the cursor is included when I prtscr key?
Riley Rebuses that Share a Common Theme
Windows 10 Programms start without visual Interface
Looking for a soft substance that doesn't dissolve underwater
How were these pictures of spacecraft wind tunnel testing taken?
What is the largest (size) solid object ever dropped from an airplane to impact the ground in freefall?
What is the object moving across the ceiling in this stock footage?
analysis of BJT PNP type - why they can use voltage divider?
I think I may have violated academic integrity last year - what should I do?
React on Github Pages: gh-pages package not working
gh-pages failing while trying to deploy Reactjs app to GitHub in windows 10Loop inside React JSXProgrammatically navigate using react routerDeploying react app to github pagesReact website not deploying to GitHub Pagesdeploying create-react-app to gh-pagesErrors running NPM commands after posting React app to github pages.How to deploy create-react-app to github pages? getting “fatal: Could not read from remote repository.”Getting blank page after react app publish in githubError While Deploying React application on serverLosing settings for personal domain on GitHub after deploy React app
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
Problem
I am trying to put my React app on github pages. However, I can't even deploy the app to GitHub pages.
My Setup
I am using Visual Studio Code on my Windows 10 machine. I created my React app with create-react-app. I followed this tutorial to set up my app for Github Pages. This is my package.json:
"homepage": "https://MisturDust319.github.io/ign_code_foo",
"name": "ign_code_foo",
"version": "0.1.0",
"private": true,
"dependencies":
"axios": "^0.18.0",
"bootstrap": "^4.1.0",
"gh-pages": "^1.1.0",
"react": "^16.3.1",
"react-dom": "^16.3.1",
"react-scripts": "1.1.4",
"reactstrap": "^5.0.0-beta.3"
,
"scripts":
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"predeploy": "npm run build",
"deploy:": "gh-pages -d build"
,
"devDependencies":
The full source is available here
What I've Done
To deploy, you are supposed to just run
npm run deploy
However, when I enter that command, from Windows PowerShell, Git Bash, and the Command Prompt, I just get several variations of "command not found".
In response, I uninstalled gh-pages from dev-dependencies and reinstalled it as a normal dependency. No change. At this point, I've exhausted all solutions I can think of, and Google has only pulled up people who didn't include the deploy command in package.json.
reactjs visual-studio-code windows-10 github-pages
add a comment |
Problem
I am trying to put my React app on github pages. However, I can't even deploy the app to GitHub pages.
My Setup
I am using Visual Studio Code on my Windows 10 machine. I created my React app with create-react-app. I followed this tutorial to set up my app for Github Pages. This is my package.json:
"homepage": "https://MisturDust319.github.io/ign_code_foo",
"name": "ign_code_foo",
"version": "0.1.0",
"private": true,
"dependencies":
"axios": "^0.18.0",
"bootstrap": "^4.1.0",
"gh-pages": "^1.1.0",
"react": "^16.3.1",
"react-dom": "^16.3.1",
"react-scripts": "1.1.4",
"reactstrap": "^5.0.0-beta.3"
,
"scripts":
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"predeploy": "npm run build",
"deploy:": "gh-pages -d build"
,
"devDependencies":
The full source is available here
What I've Done
To deploy, you are supposed to just run
npm run deploy
However, when I enter that command, from Windows PowerShell, Git Bash, and the Command Prompt, I just get several variations of "command not found".
In response, I uninstalled gh-pages from dev-dependencies and reinstalled it as a normal dependency. No change. At this point, I've exhausted all solutions I can think of, and Google has only pulled up people who didn't include the deploy command in package.json.
reactjs visual-studio-code windows-10 github-pages
What does it say exactly? When you run the command.
– Paul McLoughlin
Apr 15 '18 at 19:00
bash: gh-pages: command not found
– MisturDust319
Apr 15 '18 at 19:27
1
Are you suregh-pagesis actually installed or it only is on yourpackage.json? Trynpm installfirst
– Carlo
Apr 15 '18 at 20:40
I had the same problem and found runningnpm install gh-pages --save-devagain fixed it
– Fractaly
Mar 6 at 5:29
1
I'm getting this error as well. I've installedgh-pagesmultiple times with the--save-devflag and I've restarted my terminal but it is still not recognizing this command. 😭
– xiaodeaux
May 2 at 23:05
add a comment |
Problem
I am trying to put my React app on github pages. However, I can't even deploy the app to GitHub pages.
My Setup
I am using Visual Studio Code on my Windows 10 machine. I created my React app with create-react-app. I followed this tutorial to set up my app for Github Pages. This is my package.json:
"homepage": "https://MisturDust319.github.io/ign_code_foo",
"name": "ign_code_foo",
"version": "0.1.0",
"private": true,
"dependencies":
"axios": "^0.18.0",
"bootstrap": "^4.1.0",
"gh-pages": "^1.1.0",
"react": "^16.3.1",
"react-dom": "^16.3.1",
"react-scripts": "1.1.4",
"reactstrap": "^5.0.0-beta.3"
,
"scripts":
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"predeploy": "npm run build",
"deploy:": "gh-pages -d build"
,
"devDependencies":
The full source is available here
What I've Done
To deploy, you are supposed to just run
npm run deploy
However, when I enter that command, from Windows PowerShell, Git Bash, and the Command Prompt, I just get several variations of "command not found".
In response, I uninstalled gh-pages from dev-dependencies and reinstalled it as a normal dependency. No change. At this point, I've exhausted all solutions I can think of, and Google has only pulled up people who didn't include the deploy command in package.json.
reactjs visual-studio-code windows-10 github-pages
Problem
I am trying to put my React app on github pages. However, I can't even deploy the app to GitHub pages.
My Setup
I am using Visual Studio Code on my Windows 10 machine. I created my React app with create-react-app. I followed this tutorial to set up my app for Github Pages. This is my package.json:
"homepage": "https://MisturDust319.github.io/ign_code_foo",
"name": "ign_code_foo",
"version": "0.1.0",
"private": true,
"dependencies":
"axios": "^0.18.0",
"bootstrap": "^4.1.0",
"gh-pages": "^1.1.0",
"react": "^16.3.1",
"react-dom": "^16.3.1",
"react-scripts": "1.1.4",
"reactstrap": "^5.0.0-beta.3"
,
"scripts":
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"predeploy": "npm run build",
"deploy:": "gh-pages -d build"
,
"devDependencies":
The full source is available here
What I've Done
To deploy, you are supposed to just run
npm run deploy
However, when I enter that command, from Windows PowerShell, Git Bash, and the Command Prompt, I just get several variations of "command not found".
In response, I uninstalled gh-pages from dev-dependencies and reinstalled it as a normal dependency. No change. At this point, I've exhausted all solutions I can think of, and Google has only pulled up people who didn't include the deploy command in package.json.
reactjs visual-studio-code windows-10 github-pages
reactjs visual-studio-code windows-10 github-pages
asked Apr 15 '18 at 18:57
MisturDust319MisturDust319
263
263
What does it say exactly? When you run the command.
– Paul McLoughlin
Apr 15 '18 at 19:00
bash: gh-pages: command not found
– MisturDust319
Apr 15 '18 at 19:27
1
Are you suregh-pagesis actually installed or it only is on yourpackage.json? Trynpm installfirst
– Carlo
Apr 15 '18 at 20:40
I had the same problem and found runningnpm install gh-pages --save-devagain fixed it
– Fractaly
Mar 6 at 5:29
1
I'm getting this error as well. I've installedgh-pagesmultiple times with the--save-devflag and I've restarted my terminal but it is still not recognizing this command. 😭
– xiaodeaux
May 2 at 23:05
add a comment |
What does it say exactly? When you run the command.
– Paul McLoughlin
Apr 15 '18 at 19:00
bash: gh-pages: command not found
– MisturDust319
Apr 15 '18 at 19:27
1
Are you suregh-pagesis actually installed or it only is on yourpackage.json? Trynpm installfirst
– Carlo
Apr 15 '18 at 20:40
I had the same problem and found runningnpm install gh-pages --save-devagain fixed it
– Fractaly
Mar 6 at 5:29
1
I'm getting this error as well. I've installedgh-pagesmultiple times with the--save-devflag and I've restarted my terminal but it is still not recognizing this command. 😭
– xiaodeaux
May 2 at 23:05
What does it say exactly? When you run the command.
– Paul McLoughlin
Apr 15 '18 at 19:00
What does it say exactly? When you run the command.
– Paul McLoughlin
Apr 15 '18 at 19:00
bash: gh-pages: command not found
– MisturDust319
Apr 15 '18 at 19:27
bash: gh-pages: command not found
– MisturDust319
Apr 15 '18 at 19:27
1
1
Are you sure
gh-pages is actually installed or it only is on your package.json? Try npm install first– Carlo
Apr 15 '18 at 20:40
Are you sure
gh-pages is actually installed or it only is on your package.json? Try npm install first– Carlo
Apr 15 '18 at 20:40
I had the same problem and found running
npm install gh-pages --save-dev again fixed it– Fractaly
Mar 6 at 5:29
I had the same problem and found running
npm install gh-pages --save-dev again fixed it– Fractaly
Mar 6 at 5:29
1
1
I'm getting this error as well. I've installed
gh-pages multiple times with the --save-dev flag and I've restarted my terminal but it is still not recognizing this command. 😭– xiaodeaux
May 2 at 23:05
I'm getting this error as well. I've installed
gh-pages multiple times with the --save-dev flag and I've restarted my terminal but it is still not recognizing this command. 😭– xiaodeaux
May 2 at 23:05
add a comment |
2 Answers
2
active
oldest
votes
You need install gh-pages before running deploy, run:
npm install --save-dev gh-pages
thennpm run deploy
1
He has it inpackage.json
– flppv
Mar 24 at 7:16
add a comment |
Might be a path problem, it's a usual case for Windows users that try to use cmd instead of *nix terminal. Try to exit and enter cmd if you didn't yet. After that you should ensure that it can access gh-pages package.
Also you might look on answers to a similar question. And ensure that your git version is >= 1.9 as it's told in requirements.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f49845663%2freact-on-github-pages-gh-pages-package-not-working%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You need install gh-pages before running deploy, run:
npm install --save-dev gh-pages
thennpm run deploy
1
He has it inpackage.json
– flppv
Mar 24 at 7:16
add a comment |
You need install gh-pages before running deploy, run:
npm install --save-dev gh-pages
thennpm run deploy
1
He has it inpackage.json
– flppv
Mar 24 at 7:16
add a comment |
You need install gh-pages before running deploy, run:
npm install --save-dev gh-pages
thennpm run deploy
You need install gh-pages before running deploy, run:
npm install --save-dev gh-pages
thennpm run deploy
answered Mar 24 at 6:40
Paulinho CampelloPaulinho Campello
3115
3115
1
He has it inpackage.json
– flppv
Mar 24 at 7:16
add a comment |
1
He has it inpackage.json
– flppv
Mar 24 at 7:16
1
1
He has it in
package.json– flppv
Mar 24 at 7:16
He has it in
package.json– flppv
Mar 24 at 7:16
add a comment |
Might be a path problem, it's a usual case for Windows users that try to use cmd instead of *nix terminal. Try to exit and enter cmd if you didn't yet. After that you should ensure that it can access gh-pages package.
Also you might look on answers to a similar question. And ensure that your git version is >= 1.9 as it's told in requirements.
add a comment |
Might be a path problem, it's a usual case for Windows users that try to use cmd instead of *nix terminal. Try to exit and enter cmd if you didn't yet. After that you should ensure that it can access gh-pages package.
Also you might look on answers to a similar question. And ensure that your git version is >= 1.9 as it's told in requirements.
add a comment |
Might be a path problem, it's a usual case for Windows users that try to use cmd instead of *nix terminal. Try to exit and enter cmd if you didn't yet. After that you should ensure that it can access gh-pages package.
Also you might look on answers to a similar question. And ensure that your git version is >= 1.9 as it's told in requirements.
Might be a path problem, it's a usual case for Windows users that try to use cmd instead of *nix terminal. Try to exit and enter cmd if you didn't yet. After that you should ensure that it can access gh-pages package.
Also you might look on answers to a similar question. And ensure that your git version is >= 1.9 as it's told in requirements.
answered Mar 24 at 7:21
flppvflppv
1,9161428
1,9161428
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f49845663%2freact-on-github-pages-gh-pages-package-not-working%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What does it say exactly? When you run the command.
– Paul McLoughlin
Apr 15 '18 at 19:00
bash: gh-pages: command not found
– MisturDust319
Apr 15 '18 at 19:27
1
Are you sure
gh-pagesis actually installed or it only is on yourpackage.json? Trynpm installfirst– Carlo
Apr 15 '18 at 20:40
I had the same problem and found running
npm install gh-pages --save-devagain fixed it– Fractaly
Mar 6 at 5:29
1
I'm getting this error as well. I've installed
gh-pagesmultiple times with the--save-devflag and I've restarted my terminal but it is still not recognizing this command. 😭– xiaodeaux
May 2 at 23:05