I have node 8 required for my project, but I need to use node 10 for running one of my build command. Is it good to use nvm for running single command with different node version or shall I upgrade my project with higher node version?
Related
I'm trying to install VS Code on a Raspberry PI (Pi 3).
I got the Raspberry Pi OS with some pre-installed node application that I want to debug and extend the functionnality.
There for i thought it would be great to have VS Code Server running on the Pi so that i don't have to have the Pi connected to the Internet all the time in order to do the remote-ssh (and this option didn't even work).
The "Blackbox" application that I want to debug / extend the functionnality runs with node v7.10.0.
Or at least that's what node -v tells me.
I've tried to install nvm in order to switch node versions to be able to install VS Code Server.
I've done the nvm install 12.0.0 (as VS Code Server says it requires at least node v12) and the nvm use v12.0.0. I've tried to use nvm alias default v12.0.0 aswell, but still if i type node -v it gives me the v7.10.0. The installation of VS Code server doesn't succeed as it is most probably using the node version installed directly in the linux.
Is there anything i can do in order to have the node -v giving out v12.0.0 so that VS Code can install properly?
VS Code thereafter probably need to use this version (v12.0.0) to operate but the "blackbox" node project still needs to run with node version v7.10.0 (I don't know it it supports anything higher that that).
I thought that nvm is controlling the node versions that and that i would be possible to run two different node versions beside each other or at least switch between them.
Is there anything I can do to install VS Code Server?
I know I can change the node version by nvm use CLI command. However, I want to set specific node version differently for a certain project(folder). It's changed via nvm use command but it's reverted to default version whenever I restart the terminal or webstorm IDE.
How can I set nvm remember this different version for a certain project(folder)?
You can use an .nvmrc file in the root of the project with the version you want to use. For example v12.4.0 or v10.16.0.
You have to make sure that this version is installed or it will use the default node version in your machine.
For example, you want your default node version for this project to be v12.
Open your command line in the project root folder, then run nvm use 12, then run node -v > .nvmrc.
It won't solve your issue completely because you'll anyway have to run nvm use just without the version.
Steps we have tried :-
1) We installed nvm and its node version in our CI server.
2) There are two projects. Both use different versions of node.
3) When we run 'nvm use version' . Same node version is set for both the projects. Due to this simultaneous build is not working.
Is it possible to use different versions of node simultaneously.
Works for Linux. You can see I have two versions of node is installed in my machine
-> v10.15.3
v12.10.0
Then I ran
`nvm alias default node`.
In the current cli my node version is 10.15.3.
Now open another cli window and check that. For me that is is 12.10.0.
So set a default version then change around it using
nvm use your_desired_version
. See below image.
System: CENTOS7
I'm working on our TEST system that has a version of node prior to 8.9.
The application which I'm working on uses node 8.9.
The application runs fine when deployed out to Tomcat.
The issue is that I'm unable to just run 'ng serve' because the system sees v6.x.x.
Is there a way that I can modify my project to see the packaged node v8.x so I can run the ng options?
I'm instructed to not modify the system settings.
UPDATE
Just so others know what I ended up doing was modifying my bash script to include in the PATH ./node_modules to where node was in the local project. This is always the same path for whatever project and its version on node.
I did that for a while until a few months ago when we finally had rights to do things differently and are now using Node Version Manager
Install nvm (node version manager) to centOS
Then you will can install many version of node in your system
In this case you have to alias default version of node in nvm setting with version you want
I'm working on two applications. The first one has been migrated to 4.2, the other one still needs to be migrated. So, I'm wondering... is there a way to run two different processes against two diff Node.js binaries? In this case, it would be 4.2 and 0.12.
Yes. If you use nvm (https://github.com/creationix/nvm) you'll be able to do this easily.
Using nvm install both Node.js v4.2 and v0.12:
nvm install 4.2
nvm install 0.12
When you run nvm use <version>, nvm will set the Node.js version to <version> for just that terminal window/tab. So, in one terminal you can run nvm use 4.2 then run your node.js application, and in another terminal window or tab run nvm use 0.12 and run your node.js application that uses v0.12.
If you don't want that terminal window or tab to be scoped to a specific version of Node.js, you can use nvm to just run the server using nvm run <version> <args>. For example:
nvm run 0.12 server.js