In my Linux mint, previous version of nodejs was v8.10.0 so I decided to upgrade it and after upgrade, I run nodejs -v but it is sill reporting v8.10.0 (after restarting pc too). If I run node -v it is reporting v12.17.0 (which is currently the latest version). I don't know what is the difference between node and nodejs.
I run a xyz.js file from both node and nodejs it runs successfuly.
You can see some terminal output for your help -
$ which -a node
/usr/local/bin/node
/usr/bin/node
$ node -v
v12.17.0
$ which -a nodejs
/usr/bin/nodejs
$ nodejs -v
v8.10.0
Is my system using node/nodejs latest version, If not what should I do ?
What's happening here is simply the new version of node installs as 'node' while the older version installed as 'nodejs'. Given that your older version of 'nodejs' was working fine and the new version, 'node', never overwrote it you're left with two different versions of node. As a test, I change the name of the node file and or remove it from the folder altogether and see what happens. I'm sure you will be left with only on the version of node being recognized on your system.
Related
I am trying to do
npm install wrtc
with node version 16.14.0
but that's not getting done. It's giving
npm error code 1
So I was trying to change node version to previous lts which was 14.19.0 but it's not getting changed
I did...
node -v
nvm list
nvm use 14.19.0 => output - ***Now using node v14.19.0 (npm v8.5.3)***
node -v (version not changed... Still 16.14.0
nvm list - shows the arrow mark '->' still on system
Are you following these steps?
Please make sure that your npm version is correctly installed according to your node version.
I'm trying to do an install but it requires node.js 11 or below. I am using nvm and change to v9.0.0.
node -v shows v9.0.0 but then when I do rush install it says my version is 12.(can't remember exact version)
Why would I get this error even after node -v tells me I'm using v9.0.0?
I'm on Ubuntu.
I recently updated my version of node using homebrew to begin learning angular and ran into something curious. Upon using:
brew upgrade node
It responds:
node 13.7.0 already installed
But then when I check which version, this happens.
node -v
v10.15.3
So am I really using 13.7? Because according to https://angular.io/guide/setup-local I need version 10.9 or better. So 10.15 would certainly be a problem.
Try running this command which -a node in your command shell.
That will list all the node binaries in your PATH. More than likely your path is mucked up and the MacOS installed version of node is found in the path before the brew-installed version of `node.
I am working on two different angular projects on my computer.
If I run node -v on project A's root folder I get version 10.15.3 and if I run node -v on project B's root folder I get another version 12.1.
I don't understand why node is showing two different versions.
If I check the PATH of the node command it points to the same file /usr/bin/node.
thanks for replaying back. I am not using nvm. However I was checking another question here: link
node -v v10.15.3
nodejs -v v12.1.0
node comes from apt-get installed package (on Debian).
I was having issues when serving an ionic app, so I decided to remove npm version of node (v12.1.0):
npm remove -g node
Then I open another terminal and now node and nodejs are showing same version 10.15.3. For my testing purposes I need LTS version instead of latest in order to ensure less bug-prone code.
I usually do not have any issues with nvm, but a React Native / Xcode project is failing to build because it's trying to use Node v4.4.3.
My nvm ls looks like this:
v5.11.0
v5.11.1
v6.1.0
v6.9.5
v6.11.5
-> v8.7.0
v10.1.0
system
When I type nvm use system and node -v it prints 4.4.3, so I suppose that's where Xcode is getting 4.4.3 from.
But when I type nvm alias system 8.7.0 (attempting to alias the system to 8.7.0), it prints system -> 8.7.0 (-> v8.7.0) and node -v still returns 4.4.3.
I also tried nvm install 8.7.0 --reinstall-packages-from=node, but that didn't really seem to do anything to help the cause.
I probably had node installed with brew at one point, but believe I've installed it because brew node -v returns Error: Unknown command: node Error: Kernel.exit.
Wondering if anyone can point me in the correct direction!
. ~/.nvm/nvm.sh at the top of the shell script in Build Phases did the trick.
Try this answer:
https://stackoverflow.com/a/11298299/8723007
I also installed node with brew at some point which I just forgot about it because I also use nvm.
:facepalm:
Try $ brew upgrade node in Terminal and if that doesn't work trying installing node with homebrew anyway. You should get the system version to be the most up to date. As of rn that's version 11.