I'm on ubuntu. Installed node from ubuntu repository and everything was fine. Needed node-waf for one of the modules I was trying to install so I installed node to latest unstable from source. Now npm is broken. Want to go back to node 0.4 stable but when I uninstall the from source version i'm having problems.
sudo make uninstall
, succeeds)bash: /usr/local/bin/node: No such file or directory
How can I get it to stop looking for node in that path? Ubuntu repo node binaries still exist in /usr/bin/node
. Running
cd /usr/bin ; ./node -v
works and spits out v0.4.12.
Running
cd /usr/bin ; node
errors.
To see if Node is installed, open the Windows Command Prompt, Powershell or a similar command line tool, and type node -v . This should print a version number, so you'll see something like this v0.
You will need to modify your code to make use of the new module... so yes, you have to restart that particular node process.
The “enoent” can appear because of some missing files or usage of the relative path that can be solved by creating an expected directory structure or using an absolute path, respectively. There are also many other reasons for getting this error.
The bash(1)
shell will store the full pathname of an executable the first time it must search through the directories in the PATH
environment variable. (It doesn't want to repeat this search every single time you type ls
or cat
, that'd be significantly slower than just looking up the exact pathname in a table.)
This process normally works without incident -- until you (re)move an executable between directories in the PATH
.
New shells will not have trouble. Existing shells will need you to run hash -r
to remove all the mappings from the built-in table. (Well, you can remove an individual entries using hash -d node
, but re-populating the cache isn't horrible -- you do it every single time you start a shell -- and if there are multiple programs that are now missing, removing them all will save you from removing them individually.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With