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

"git-upload-pack" command not found with React v16.4.2 #10

Closed
drewkiimon opened this issue Aug 17, 2018 · 16 comments
Closed

"git-upload-pack" command not found with React v16.4.2 #10

drewkiimon opened this issue Aug 17, 2018 · 16 comments

Comments

@drewkiimon
Copy link

drewkiimon commented Aug 17, 2018

For some reason, once in a blue moon I won't be able to run npm run deploy because when attempting to do "gh-pages -d build" it cannot find git-upload-pack. If I give it a day or two, then come back and try to deploy it works perfectly.

Is there a fix to this? Not sure how to push my React project to github pages when it keeps giving me these errors.

git upload pack

Edit: 8-17-18 @ 1 PM
It seems that my old projects running React v16.4.1 upload perfectly fine. However, my most recent project is using React v16.4.2. Anyone sure if that could be the reason why it isn't working?

@gitname
Copy link
Owner

gitname commented Aug 19, 2018

Hi @drewkiimon,

I'll paste the error message here to facilitate future searches through this repo's issues:

git-upload-pack '.': git-upload-pack: command not found

I don't recall having seen that error message before.

I interpret the error message to mean whatever thing happens to be looking for a command named git-upload-pack is not finding one in the context in which it is looking for it. That's about all I have gleaned from the combination of information you provided and my own knowledge.


My thoughts:

  • I think one way to find out what that thing is that is looking for that command, is to dig into the gh-pages -d build invocation and trace the execution flow. In other words, view the contents of C:\Users\pagana2\Documents\code\eversnake\node_modules\.bin\gh-pages (which is a bash script) and step through each instruction until you see something looking for the git-upload-pack command. I have not done this, myself, as it sounds pretty tedious to me!

  • Assuming the thing is your shell, I am curious what the output of $ which git-upload-pack is, both when the deployment process is working and when the deployment process is not working.

    For reference, here is what $ which git-upload-pack outputs on my Windows system running Git bash inside ConEmu:

    $ which git-upload-pack
    /mingw64/bin/git-upload-pack
    
  • I haven't tested this deployment process with React v16.4.2 yet. I'll put that on my todo list.

    • Test this deployment process with React v16.4.2.

@gitname gitname changed the title git-upload-pack '.': git-upload-pack: command not found "git-upload-pack" command not found with React v16.4.1 Aug 19, 2018
@gitname gitname changed the title "git-upload-pack" command not found with React v16.4.1 "git-upload-pack" command not found with React v16.4.2 Aug 19, 2018
@ghost
Copy link

ghost commented Aug 20, 2018

So it because the git. Maybe reinstall it may work ???
P/S: Can you show me the Log (Error Log)

@drewkiimon
Copy link
Author

@dangpro-1210 @gitname It turns out that since I'm using CMDER it uses it's own pre-installed version of Git. I had to reinstall git, add the path to git-upload-pack, and then restart my computer to get it to work.

It's just weird since it worked in the past and I could see my React projects online.

@alamgirqazi
Copy link

I have the same error with all consoles. VS Code Integrated Terminal, Hyper and CMDER.

git-upload-pack '.': git-upload-pack: command not found fatal: Could not read from remote repository.

@ghost
Copy link

ghost commented Aug 31, 2018

As @drewkiimon said, if it doesn't work, it 'cause the git it self. So the way to fix it is to reinstall it and add the git-upload-pack's path.

@ieopvl
Copy link

ieopvl commented Jul 21, 2020

Hi, if you want resolve this mistake without efforts just try to do "npm run deploy" from git bash (not from cmder windows terminal)

@khang-nd
Copy link

khang-nd commented Sep 3, 2020

Thank you @ieopvl, your solution worked for me.

@Noxormy
Copy link

Noxormy commented Oct 1, 2020

Thank you @ieopvl

@rajeev-sirpi
Copy link

Thanks @khang-nd , worked

@prateek-works
Copy link

thankyou so so much @ieopvl . You're a savior.

@jperalta-EndlessCodeStudio

@ieopvl Thanks dude.

@yervand-stepanyan
Copy link

@ieopvl Thank you, running "npm run deploy" from "git bash terminal" works for React v17.0.1, too.

@Tiffolin
Copy link

Tiffolin commented Jan 3, 2021

@ieopvl my luscious head of hair thanks you, (since I no longer have to spend hours pulling them out figuring how to 'fix' this)

@drewkiimon
Copy link
Author

Seems like things have been sorted out!

@danya-prohvat
Copy link

Thanks

@davitSahakyan
Copy link

@ieopvl thank you it worked

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

No branches or pull requests