-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
how to avoid env: node: No such file or directory #1702
Comments
Try |
@ljharb thanks for the quick response, but I tried that with no luck. My guess is that aliasing in nvm would not work since I am not loading nvm when I start the terminal. Can I just symlink the |
You definitely don’t want to do that. Why aren’t you loading nvm in your profile files? That’s required to be able to use nvm. |
Ok, thanks for clarifying. Well, I use terminal a lot and nvm adds about 2s to my shell's starting time, which is annoying to me. I only use node occasionally. |
The confusing part is that I should be ok to not use node. while after installing nvm, it will always keep hinting for not having unexecutatble node in /bin. |
What do you mean by “hinting”? If you have something in your profile files that references node, that might do it. |
@ljharb sorry for the confusion, I was meaning |
On macOS High Sierra, I had to run |
use this comment to create a symlink:
|
@RyanPWalker this would only work if you installed node through homebrew. This wouldn't work if you opted not to install node and only use nvm directly. @mrsoftware's suggestion would work in this case assuming that you use bash, and not something else like fish. You'll have to re-link it though each time you change your node version if in case you want those shebang lines to use the selected node version. edit: or if linking to |
This comment has been minimized.
This comment has been minimized.
On newer macos with readonly
|
macOS 10.13.2 (17C88)
nvm debug
output:nvm ls
output:How did you install
nvm
? (e.g. install script in readme, homebrew):install script
What steps did you perform?
I commented the loading nvm script in shell to make my terminal loads faster, then load nvm whenever I need Node.js
What happened?
env: node: No such file or directory
shows up every new terminal openedWhat did you expect to happen?
nothing like that shows up even I am not loading nvm(or, I am not using Node.js)
Is there anything in any of your profile files (
.bashrc
,.bash_profile
,.zshrc
, etc) that modifies thePATH
?curl -I --compressed -v https://nodejs.org/dist/
print out?The text was updated successfully, but these errors were encountered: