Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 416 Vote(s) - 3.56 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can the default node version be set using NVM?

#11
`nvm alias default 16` (where "16" is the version you want to use) but if you're install node from

[To see links please register here]

before I would suggest you remove it first. For m1 or m1 pro chips, I suggest you follow this solution:
Reply

#12
I did something like that after running a `nvm install --lts`:

```sh
nvm alias default 'lts/*'
```
Reply

#13
Make sure to have the correct version of node installed globally. Your company might be using a different version.
Reply

#14
First check available versions

nvm list

Then set default version using

nvm alias default lts/**

[![enter image description here][1]][1]


[1]:


Reply

#15
For those testing this in **VSCode terminal** and still seeing the old version even after killing/restarting terminal -- VS code caches the old version somehow. Close/reopen your full VSCode window and you should see the correct version with `node -v`.
Reply

#16
If you want to switch only for once use this

nvm use 12.x

Else if you want to switch the default node version then use

nvm use default 12.x
or

nvm alias default 12.x
Reply

#17
**In Nutshell steps to use NVM**

For Mac

curl -o-

[To see links please register here]

| bash
nvm install 16
nvm use 16
nvm alias default 16
npm install npm --global # Upgrade npm to the latest version

For Linux

sudo apt install curl git
curl -sL

[To see links please register here]

| sudo -E bash -
sudo apt install nodejs

For Windows

Git's installer for Windows from below link

[To see links please register here]


node-v16.XX.XX-x64.msi from below link

[To see links please register here]


[1]:

[To see links please register here]

Reply

#18
This is what works for me.

```
nvm use default v16
```

This did not do anything for me
```
nvm alias default v16
```
Reply

#19
````nvm alias default <node version>````

this will make the ````<node version>```` default.
Reply

#20
**nvm alias default v14.17.5**


mazin ~  nvm ls
v10.15.1
-> v12.19.0
v14.17.5
v16.14.0
default -> 12 (-> v12.19.0)
node -> stable (-> v16.14.0) (default)
stable -> 16.14 (-> v16.14.0) (default)
iojs -> N/A (default)
unstable -> N/A (default)
lts/* -> lts/gallium (-> v16.14.0)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.24.1 (-> N/A)
lts/erbium -> v12.22.10 (-> N/A)
lts/fermium -> v14.19.0 (-> N/A)
lts/gallium -> v16.14.0

mazin ~  nvm use 14
Now using node v14.17.5 (npm v8.7.0)

mazin@zhihongtongxue  ~  nvm ls
v10.15.1
v12.19.0
-> v14.17.5
v16.14.0
default -> 12 (-> v12.19.0)
node -> stable (-> v16.14.0) (default)
stable -> 16.14 (-> v16.14.0) (default)
iojs -> N/A (default)
unstable -> N/A (default)
lts/* -> lts/gallium (-> v16.14.0)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.24.1 (-> N/A)
lts/erbium -> v12.22.10 (-> N/A)
lts/fermium -> v14.19.0 (-> N/A)
lts/gallium -> v16.14.0

mazin ~  nvm alias default 14
default -> 14 (-> v14.17.5)

mazin ~  nvm ls
v10.15.1
v12.19.0
-> v14.17.5
v16.14.0
default -> 14 (-> v14.17.5)
node -> stable (-> v16.14.0) (default)
stable -> 16.14 (-> v16.14.0) (default)
iojs -> N/A (default)
unstable -> N/A (default)
lts/* -> lts/gallium (-> v16.14.0)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.24.1 (-> N/A)
lts/erbium -> v12.22.10 (-> N/A)
lts/fermium -> v14.19.0 (-> N/A)
lts/gallium -> v16.14.0


Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through