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.
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