nvm error Now using node v version number (64-bit) solution

nvm error Now using node v version number (64-bit) solution

Report an error first

(Please skip to the end for some questions after installation.)
insert image description here
The reason for installing NVM is that when adding react-redux when using React, it reminds me of a node version problem, so I plan to install a Node version management tool
because I installed Node on my computer a long time ago. , when installing NVM, it prompted me whether to overwrite and manage the existing local version. After I selected Yes
, the installation was successful.

Notes on installing NVM

1. If you modify the installation path, you must add nodejs
insert image description here
insert image description here

2. Open the installation file location
insert image description here3. Add the following mapping

node_mirror:npm.taobao.org/mirrors/node/
npm_mirror:npm.taobao.org/mirrors/npm/

insert image description here
Note: root and path must be placed under the same disk during installation, otherwise there will be problems with the subsequent Install

Action after installation

  1. Open local Windows PowerShell with super administrator privileges
  2. Executed the following command to check the local version
    insert image description here
  3. Install other Node versions
nvm install 版本号
nvm install 版本号
  1. Switch to the specified Node
nvm use 版本号

Note that an error is reported at this time, prompting Now using node v version number (64-bit)
insert image description here
is not too much trouble, directly to the solution

solution

Uninstall Node

  1. Press the win key directly, search and delete (or uninstall),
    insert image description here

  2. Delete after searching for node
    insert image description here

  3. Go to the C drive to find the remaining files
    a. The default is C:\Program Files\nodejs, or it may be in other drives, depending on the choice during installation.
    b. Find out whether the **.npmrc** file exists, and delete it if it exists (the default is C:\User\username.)
    c. Check the file

    C:\Program Files (x86)\Nodejs
    C:\Program Files\Nodejs
    C:\Users\用户名\AppData\Roaming\npm
    C:\Users\用户名\AppData\Roaming\npm-cache
    

    d. cmd command node -v

Finally switch directly in Windows PowerShell

nvm use 版本号

After switching, node -v will find that node already exists and the version switching is successful.
insert image description here
Check the local headquarters node -v
insert image description here

So far done

The following are common commands for NVM

1. nvm -v //View nvm version

nvm --version :显示 nvm 版本

2. nvm list //Display version list

nvm list :显示已安装的版本(同 nvm list installed
nvm list installed:显示已安装的版本
nvm list available:显示所有可以下载的版本

3. nvm install //Install the specified version node.js

nvm install 14.5.0:安装 14.5.0 版本的 node.js
nvm install latest:安装最新版本

4. nvm use //Use the specified version node

	nvm use 14.5.0: 切换到 14.5.0 版本的 node.js
	--lts // 自动切换到长期支持版本
	--lts=<LTS name> // 自动切换到指定名称的node长期支持版本

5. nvm uninstall //Uninstall the specified version node

	nvm uninstall 14.5.0:卸载到 14.5.0 版本的 node.js
	nvm uninstall --lts // 卸载长期支持版本的node
	nvm uninstall --lts=<LTS name> // 卸载一个指定名称的长期支持版本的node

6. nvm --help //Display command line help information

7. Other commands

1. nvm 查看node版本
nvm current // 查看当前使用的node版本
nvm ls // 查看所有本地可用的node版本
nvm ls <version> // 参看指定版本
nvm ls-remote // 查看所有可用远程版本
--lts // 查看所有长期支持版本
nvm ls-remote <version> // 参看所有node的指定远程版本
--lts // 查看所有node长期支持版本
--lts=<LTS name> // 仅查看指定名称的长期支持版本

2. nvm 版本别名
nvm alias [<pattern>] // 显示所有以<pattern>开头的版本别名
nvm alias <name> <version> // 给版本<version>设置一个别名
nvm unalias <name> // 删除<name>的版本别名

3. nvmnpm
nvm install-latest-npm // 在当前node版本中,将npm升级到最新版
nvm reinstall-packages <version> // 在全局重新安装npm,从<version>版本到当前版本

4.  版本管理
nvm on :开启node.js版本管理。
nvm off :关闭node.js版本管理。

Problems and solutions after installation

Install dependencies after installation

insert image description here
Solution:

Guess you like

Origin blog.csdn.net/nlnlznl224/article/details/129406435