joshwcomeau / guppy

🐠A friendly application manager and task runner for React.js
ISC License
3.27k stars 154 forks source link

Guppy thinks node is not installed #317

Open pitops opened 5 years ago

pitops commented 5 years ago

Describe the bug Guppy thinks i do not have Node installed but using node -v in terminal, I have v10.12.0 installed.

Guppy opens up the dialog where it requires for node to be installed.

NOTE: tried Guppy 0.2.0 as well, and that doesn't work either. But no message that i need to have node installed.

To Reproduce Downloaded the latest v0.3.0 version. Put to applications folder Run

Expected behavior Guppy to be usable

Environment (please complete the following information):

quarklemotion commented 5 years ago

I had the same problem with v0.3.0 on OSX, and was able to work around it by copying the nvm initialization lines from my ~/.bash_profile to my ~/.bashrc. If you are not using nvm to manage node versions, I think you may just need to make sure your globally installed node is included in the PATH defined in your ~/.bashrc.

pitops commented 5 years ago

@quarklemotion I followed your advise in the following way

I do not use nvm but doing the following worked. I was using ~/.bash_profile. But i re-exported PATH in ~/.bashrc and it worked.

export PATH=$PATH

This is weird though because mac finds the node in path using ~/.bash_profile apparently whereas Guppy uses ~/.bashrc.

Any explanation?

aleclarson commented 5 years ago

@pitops You should put bash ~/.bashrc in your ~/.bash_profile and remove any duplicate code from your ~/.bash_profile.

pitops commented 5 years ago

@aleclarson you tell me what to do but you do not tell me why to do it.

aleclarson commented 5 years ago

@pitops Sorry, are you aware of the differences between the two? If you want to avoid duplicating the export $PATH code in both files, you can call bash ~/.bashrc from your ~/.bash_profile. The reason you evaluate ~/.bashrc from ~/.bash_profile (and not vice versa) is because a "login shell" (using .bash_profile) may choose to inherit the environment of a "non-login shell" (using .bashrc), but the opposite makes no sense. Hope that helps (if you even cared for help). 👍

pitops commented 5 years ago

@aleclarson Thats exactly the answer I was looking for, now I understand the why, thank you

davej commented 5 years ago

Also seeing this. I'm using n to manage node but it should still work if it loads the profile files correctly. I've seen that fix-path has fixed issues like this in the past.

actuallyReallyAlex commented 5 years ago

I'm having the same issue. I don't seem to have a ~/.bashrc or a ~/.bash_profile. Just a ~/.bash_history and ~/.bash_sessions.

Is there a way I can export something somewhere? Should I just create a ~/.bashrc manually and export my PATH there?

Looks like a great program, and I'm eager to try it out!

Machine Specs:

MacOS: v10.14.2 Node: v8.11.3 NPM: v6.5.0

pitops commented 5 years ago

@alexlee-dev if you don't have a .bashrc then yeah create one, and do what i did above

actuallyReallyAlex commented 5 years ago

Thanks @pitops , that worked. Good simple fix.

actuallyReallyAlex commented 5 years ago

Damn Guppy is pretty cool now that I can use it!

pitops commented 5 years ago

@alexlee-dev glad that worked for you. Yeah Guppy is pretty useful

SoftwareBlair commented 5 years ago

Having the same issue but I'm using .zsh with oh-my-zsh instead of bash. Tried repeating steps talked about in this thread in my .zshrc file but no luck.

Versions Running: nvm 0.33.11 node 10.16.0 (set as default) npm 6.9.0

VuongVu commented 5 years ago

Having the same issue but I'm using .zsh with oh-my-zsh instead of bash. Tried repeating steps talked about in this thread in my .zshrc file but no luck.

Versions Running: nvm 0.33.11 node 10.16.0 (set as default) npm 6.9.0

Just create a ~/.bashrc file and add export PATH=$PATH.

gaa23 commented 3 years ago

I have tried to follow all the advice on this thread but I can't get guppy to recognize my node installation.