0

I've tried setting up React Native/Visual Studio Code, and when trying to run a basic "Hello World" app using the command line, I run into an issue when running react-native run-ios.

When I do that, I get this message:

enter image description here

So I try the suggestion of running nvm install 8.3 --reinstall-packages-from=node, and I get the error:

nvm: command not found

My next step was following this solution from SO. I went through the steps but when it came time to Create .nvm directory at ~/.nvm location using mkdir ~/.nvm, I realized that I was currently within the project file (the Hello World project I was trying to run). I ran the mkdir ~/.nvm and the nvm folder appeared, but since I thought it was the wrong place for it, I dragged the folder to the trash.

Now upon trying to start over from step one, installing nvm from home-brew, I get another few errors:

enter image description here

My question is, was that indeed the wrong place to create the .nvm directory? Did I screw up by dragging that folder to the trash? How do I undo whatever I messed up and get nvm working so I can run my react native app?

Thanks a lot for any help!

EDIT: If I rerun the home-brew command, I get the error

Error: nvm 0.33.11 is already installed

So I tried upgrading with brew upgrade nvm, and that seemed to go well but now when I retry my initial command of nvm install 8.3 --reinstall-packages-from=node, I get:

-bash: nvm: command not found

KingTim
  • 1,281
  • 4
  • 21
  • 29
  • try installing it via homebrew again... – rogerdpack Jan 10 '19 at 18:13
  • @rogerdpack See my edit – KingTim Jan 10 '19 at 18:18
  • When you install nvm via homebrew it spits out some instructions regarding modifying ".bash_profile" to "load nvm" – rogerdpack Jan 10 '19 at 19:25
  • Yes, it tells me to create an NVM directory with `mkdir ~/.nvm`, which is where my issues started - I'm not sure where to make this directory, since running `mkdir ~/.nvm` in terminal created the folder in whatever directory I'm in (which right now is the Hello World project). Do I just make the directory there? – KingTim Jan 11 '19 at 18:50
  • If it's your home dir then yeah that's right – rogerdpack Jan 12 '19 at 01:03

0 Answers0