Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run deploy looping #419

Open
Soran-i opened this issue Jan 28, 2022 · 2 comments
Open

npm run deploy looping #419

Soran-i opened this issue Jan 28, 2022 · 2 comments

Comments

@Soran-i
Copy link

Soran-i commented Jan 28, 2022

I created a fresh create-react-app and added gh-pages to it. I go ahead and run

npm run deploy

and then I get this:

`npm run deploy

sorani.tech@0.1.0 predeploy
npm run deploy

sorani.tech@0.1.0 predeploy
npm run deploy

sorani.tech@0.1.0 predeploy
npm run deploy

sorani.tech@0.1.0 predeploy
npm run deploy

sorani.tech@0.1.0 predeploy
npm run deploy

sorani.tech@0.1.0 predeploy
npm run deploy

sorani.tech@0.1.0 predeploy
npm run deploy

sorani.tech@0.1.0 predeploy
npm run deploy

sorani.tech@0.1.0 predeploy
npm run deploy

sorani.tech@0.1.0 predeploy
npm run deploy

sorani.tech@0.1.0 predeploy
npm run deploy

sorani.tech@0.1.0 predeploy
npm run deploy

sorani.tech@0.1.0 predeploy
npm run deploy

sorani.tech@0.1.0 predeploy
npm run deploy

sorani.tech@0.1.0 predeploy
npm run deploy

sorani.tech@0.1.0 predeploy
npm run deploy

sorani.tech@0.1.0 predeploy
npm run deploy

sorani.tech@0.1.0 predeploy
npm run deploy

sorani.tech@0.1.0 predeploy
npm run deploy

sorani.tech@0.1.0 predeploy
npm run deploy

sorani.tech@0.1.0 predeploy
npm run deploy

sorani.tech@0.1.0 predeploy
npm run deploy

'npm' is not recognized as an internal or external command,
operable program or batch file.`

I am not sure why this is happening...

@tnsicdr
Copy link

tnsicdr commented Apr 10, 2022

Does the your package.json have a predeploy that runs deploy?

@DylanMcCarty
Copy link

I had the same Issue please check your package.json and see if your scripts are in the right order

Here was what i had that caused the issue

"scripts": {
"predeploy": "npm run deploy", <-----------
"deploy": "gh-pages -d build",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"

Changing that word to the correct word "build" caused it to deploy correctly
additionally I had issues when the scripts were not in the correct order

"scripts": {
"start": "react-scripts start",
"predeploy": "npm run build", <-----------
"deploy": "gh-pages -d build",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"

The code that fixed my issue was this

"scripts": {
"predeploy": "npm run build", <-----------
"deploy": "gh-pages -d build",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"

I hope that helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants