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;








5















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.










share|improve this question






















  • 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-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






  • 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

















5















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.










share|improve this question






















  • 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-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






  • 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













5












5








5








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.










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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 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






  • 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

















  • 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-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






  • 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
















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












2 Answers
2






active

oldest

votes


















0














You need install gh-pages before running deploy, run:



npm install --save-dev gh-pages
then
npm run deploy






share|improve this answer


















  • 1





    He has it in package.json

    – flppv
    Mar 24 at 7:16


















0














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.






share|improve this answer























    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
    );



    );













    draft saved

    draft discarded


















    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









    0














    You need install gh-pages before running deploy, run:



    npm install --save-dev gh-pages
    then
    npm run deploy






    share|improve this answer


















    • 1





      He has it in package.json

      – flppv
      Mar 24 at 7:16















    0














    You need install gh-pages before running deploy, run:



    npm install --save-dev gh-pages
    then
    npm run deploy






    share|improve this answer


















    • 1





      He has it in package.json

      – flppv
      Mar 24 at 7:16













    0












    0








    0







    You need install gh-pages before running deploy, run:



    npm install --save-dev gh-pages
    then
    npm run deploy






    share|improve this answer













    You need install gh-pages before running deploy, run:



    npm install --save-dev gh-pages
    then
    npm run deploy







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Mar 24 at 6:40









    Paulinho CampelloPaulinho Campello

    3115




    3115







    • 1





      He has it in package.json

      – flppv
      Mar 24 at 7:16












    • 1





      He has it in package.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













    0














    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.






    share|improve this answer



























      0














      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.






      share|improve this answer

























        0












        0








        0







        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.






        share|improve this answer













        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 24 at 7:21









        flppvflppv

        1,9161428




        1,9161428



























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

            155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해