当前位置:网站首页>NVM installation and use
NVM installation and use
2022-07-25 03:04:00 【Aviator_ huahua】
nvm Installation and use of
Because in different projects , The use of node Versions may not be consistent , In different node Use... Under version npm When installing environment dependencies , There may be problems . therefore , When installing dependencies , It is best to ensure the current node The version is consistent with the version used by the project . At this point, you need to be able to work in multiple node Switch between versions , Through installation nvm Can solve this problem .
nvm Introduce
- nvm Namely nodejs version manage, It's a nodejs Version management tools
- Use nvm Can achieve more than one node Installation and alignment of version node Free switching of versions
preparation
Uninstall installed node
Originally installed node You need to uninstall it first , otherwise nvm-windows May not work properly . If not, you can skip this step
Uninstall... In the control panel nodejs
Restart ( Or kill all and... From the task manager node Related process ).
Delete the following folder and its contents
C:\Program Files (x86)\nodejs C:\Program Files\nodejs C:\Users\{User}\AppData\Roaming\npm( or %appdata%\npm) C:\Users\{User}\AppData\Roaming\npm-cache( or %appdata%\npm-cache)Check whether there is a connection with Node Related configuration , Delete it if any
cmd Use in
node -vandnpm -vCheck whether the uninstallation is completerestart
download nvm-setup.zip Installation package
Installation package download address :https://github.com/coreybutler/nvm-windows/releases
windows System download nvm-setup.zip Installation package

install nvm
decompression nvm-setup.zip Installation package
Run as administrator nvm.exe
choice nvm The installation path , The path cannot contain Chinese and spaces
D:\Software\nvmchoice node The installation path
D:\SoftwareClick on Next Installation
test nvm Is the installation successful
cmd Use in nvm -v, Check whether the installation is successful

Install Taobao image
stay nvm Found under the installation path settings.txt, Add the following configuration
root: D:\Software\nvm
path: D:\Software\nodejs
node_mirror: https://npm.taobao.org/mirrors/node/
npm_mirror: https://npm.taobao.org/mirrors/npm/
Install the required node edition 、
Open as Administrator cmd, Execute the following command
nvm install 12.13.0 // install 12.13.0 edition node
nvm list // View all installed node edition
nvm use 12.13.0 // Use 12.13.0 edition node
Report errors
// Report errors 1:
nvm exit status 1: ��û���㹻��Ȩ��ִ�д˲�����
Because it is useless to use administrator privileges nvm use version Report the above error
// Report errors 2:
exit status 145: ���������ִ�������������ִ������������
exit status 1: ��û���㹻��Ȩ��ִ�д˲�����
Check the installation nvm Path and setting placement nodejs Path or file of , Whether there are spaces or Chinese
For example, the default installation path C:\Program Files A space appears in
If there is , Change the path or folder name before using nvm use
install nvm Whether there was nodejs Other versions
If there is , And the previous version was selected to be merged during the installation , You can delete nvm All in nodejs edition ( Mainly installation nvm Previous version ), Reinstall the required nodejs, Run again nvm use
If it still can't be solved , You can delete nvm Environment variables of , reinstall nvm
View the current project's node edition
stay package-lock.json see @types/node Configuration in
"@types/node": {
"version": "17.0.31",
"resolved": "https://registry.npmmirror.com/@types/node/-/node-17.0.31.tgz",
"integrity": "sha512-AR0x5HbXGqkEx9CadRH3EBYx/VkiUgZIhP4wvPn/+5KIsgpNoyFaRlVe0Zlx9gRtg8fA06a9tskE2MSN7TcG4Q=="
},
ntegrity": “sha512-AR0x5HbXGqkEx9CadRH3EBYx/VkiUgZIhP4wvPn/+5KIsgpNoyFaRlVe0Zlx9gRtg8fA06a9tskE2MSN7TcG4Q==”
},
边栏推荐
- Daily three questions 7.19
- Solve ''_ Xsrf 'argument missing from post
- Simulation Implementation of string function (Part 1)
- List.stream common operations
- Details of happens before rules
- The dolphin scheduler calls the shell script and passes multiple parameters
- Resolved (the latest version of selenium reported an error) attributeerror: module 'selenium webdriver‘ has no attribute ‘PhantomJS‘
- Can bus baud rate setting of stm32cubemx
- hello csdn
- Query the information of students whose grades are above 80
猜你喜欢

IO (1) -io layering

Eslint error
![[stm32f103rct6] can communication](/img/24/71509bd0d74d43ce4a79b8126478ff.jpg)
[stm32f103rct6] can communication

DOM operation -- get elements and nodes

Ctfshow misc introduction

Sequence diagram of UML diagram series

Use unicloud cloud function to decode wechat motion steps in applet
![[jailhouse article] scheduling policies and system software architectures for mixed criticality](/img/cc/874f8436991fdeb3a0e87e526c1753.png)
[jailhouse article] scheduling policies and system software architectures for mixed criticality

How to take the mold for the picture of 1.54 inch TFT st7789 LCD screen

The latest interview questions and analysis of software testing in 2022
随机推荐
DOM operation -- get elements and nodes
Pypi counts the number of Downloads
JS foundation -- task queue and event loop
Wechat sports field reservation of the finished works of the applet graduation project (6) opening defense ppt
Simulation Implementation of string function (Part 1)
SQL Server 2022 installation
JS method encapsulation summary
Inheritance (prototype)
Innobackupex parameter description
Method of adding kernel in Jupiter notebook
Hashcode details
Tp5.1 include include files (reference public files)
List title of force buckle summary
Review all frames before sum of SSM frames
JS foundation -- hijacking of this keyword
Dynamic planning of force buckle punch in summary
How to take the mold for the picture of 1.54 inch TFT st7789 LCD screen
Daily three questions 7.16
Learning record Xi
Sum of "n" numbers of force deduction summary