DEV Community

Discussion on: How to run multiple Node and Angular versions simultaneously

Collapse
 
patricepeartree profile image
Patrícia Pereira

Hi. Yes, you're right, after nvm use you can execute only npm start and it will use the Node version you selected.

But actually the correct command to run npm as you were trying would be nvm exec npm start (not nvm run), maybe that's why you were getting an error? I see I have that command wrong in one of the sections of the post, I have a nvm run where a nvm exec should be (I'm going to edit that). Running the commands like this is only usefull if you have a .nvmrc file to avoid having to execute nvm use every time. But like you said, if you run nvm use, then you can actually just use the normal node and npm commands!