Reputation: 39
I have a problem with using my node in nvm
I can see my node when i enter nvm ls
v9.11.2
v14.16.1
v16.0.0
-> system
Then, I enter nvm use 14
, which prints out Now using node v14.16.1 (npm v6.14.12)
however, when i enter node -v
it prints out -bash: /home/pi/.nvm/versions/node/v14.16.1/bin/node: No such file or directory
then, when i enter nvm ls
, i cant find an arrow that points my current node.(arrow just dissapear)
v9.11.2
v14.16.1
v16.0.0
system
this problem occurs except for system node
Also, i can find that node file if i manually go into that directory. How can i solve this problem?
I am currently using rpi4 with rasberry pi OS(aarch64).
+) i have to enter nvm use system
every time i reboot my computer
Upvotes: 1
Views: 525
Reputation: 70075
Someone experiencing this found a workaround and posted it to a GitHub issue about this problem.
Originally posted by @Ratstail91 in https://github.com/nvm-sh/nvm/issues/2458#issuecomment-854910734:
I don't have a real solution - but I think I found the cause. Run the following command on your raspberry pi 4:
uname -m
If this shows aarch64
or similar, then nvm also thinks that the raspberry pi is 64 bit, and tries to download the 64 bit version of node. Node's 32-bit build still works just fine, but for some reason the 64 bit build is failing in this very unusual way.
My only real answer is to download "Linux Binary - ARMv7" from here:
https://nodejs.org/en/download/current/
and place it in the system path. It's inelegant, but it should work, in thoery.
Upvotes: 1