当前位置:网站首页>Under the NVM node installation;The node environment variable configuration
Under the NVM node installation;The node environment variable configuration
2022-08-09 23:44:00 【m0_67393828】
1, nvm installation
1. Double-click the installation file nvm-setup.exe
2. Select the nvm installation path
3. Select the nodejs path
4. Confirm the installation
5. Confirmation after installation
Open CMD and enter the command nvm , the installation is successful and the display is as follows.You can see that various commands are listed, and the Chinese instructions for these commands will be listed at the end of this section.
6. nvm manages node version
1. View all installable versions
nvm list available
2. View all locally installed versions
nvm list
3, installation, the version number in the command
nvm install 14.18.1
4. Use the specified node version
nvm use 14.18.1
5. Uninstall
nvm uninstall 14.18.1
7. Other nvm related commands
nvm arch : Shows whether node is running in 32-bit or 64-bit.nvm install [arch] : Install node, version is a specific version or the latest stable version latest.The optional parameter arch specifies whether to install the 32-bit or 64-bit version, and the default is the system bit.You can add --insecure to bypass the remote server's SSL.nvm list [available] : Displays a list of installed ones.The optional parameter available, displays all versions that can be installed.list can be simplified to ls.nvm on : Enable node.js version management.nvm off : Turn off node.js version management.nvm proxy [url] : Set download proxy.Without the optional parameter url, the current proxy is displayed.Setting url to none removes the proxy.nvm node_mirror [url] : Set the node mirror.The default is https://nodejs.org/dist/.If no url is written, the default url is used.After setting, you can view the settings.txt file in the installation directory, or operate directly in this file.nvm npm_mirror [url] : Set npm mirror.https://github.com/npm/cli/archive/.If no url is written, the default url is used.After setting, you can view the settings.txt file in the installation directory, or operate directly in this file.nvm uninstall : Uninstall the specified version of node.nvm use [version] [arch] : Use the specified version of node.32/64 bits can be specified.nvm root [path] : Set the directory where different versions of node are stored.If not set, the current directory is used by default.nvm version : Displays the nvm version.version can be simplified to v.
2, node.js installs a version not in the nvm list
1. Download the required node version
2. Create a relevant version folder in the nvm installation path
3. Double-click to install the node file
4. Install into the version folder created in the nvm folder
6. Check if the version is installed
7. View the current node version
node -v
3, node environment variable configuration
1. First, create two new folders node_global and node_cache in the installation directory of node.js
2. After creating the two folders, enter the following commands in the cmd window (the two paths are the paths of the two folders):
npm config set prefix "D:installodejsode_global"npm config set cache "D:installodejsode_cache"
3. Next, set the computer environment variables, right-click "My Computer" = "Properties =" Advanced System Settings = "Environment Variables" to enter the following environment variables dialog box.
4. Create a new environment variable NODE_PATH in [System Variables] with the value D:install odejs ode_global ode_modules, where D:install odejs ode_global is the global module installation path folder created above
5. Modify the path variable in [User Variables], and change C:UsershuaAppDataRoaming pm to D:install odejs ode_global
6. After clicking OK, the configuration is complete.
7. Test whether the configuration is successful, enter the following in the cmd window to specify the global installation of the express module
npm install -g express # -g means global installation
[The external link image transfer failed, the origin site may have an anti-leech mechanism, it is recommended to save the image and upload it directly (img-WEpTS7x3-1652185237994)(pictures/8782952-559fa6868c6d1a16.png)]
8. Domestic mirror website configuration
npm install -g cnpm --registry=https://registry.npm.taobao.org
9. When downloading modules in the future, replace npm with cnpm to download modules from Taobao mirrors, for example
cnpm install
Let me introduce myself first. The editor graduated from Shanghai Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Alibaba in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials
边栏推荐
- Leetcode 93 IP addresses
- SQLi-LABS Page-2 (Adv Injections)
- Xiaohei leetcode's refreshing rainy day trip, just finished eating Yufei Beef Noodles, Mala Tang and Beer: 112. Path Sum
- The overall construction process of the Tensorflow model
- AI Knows Everything: Building and Deploying a Sign Language Recognition System from Zero
- 聊聊SQL语句中 DDL 、DML 、DQL 、DCL 分别是什么
- js十五道面试题(含答案)
- String hashing (2014 SERC J question)
- JS–比想象中简单
- 如何让您的公司内容满足 GDPR 合规性
猜你喜欢
随机推荐
Technology Sharing | How to use the JSON Schema mode of interface automation testing?
LeetCode26: remove duplicates in sorted array
AI识万物:从0搭建和部署手语识别系统
OpenMLDB + Jupyter Notebook:快速搭建机器学习应用
APP automation test framework - UiAutomator2 introductory
kvm虚拟机出现启动不了,NOT available,PV大于分区
TF中使用zeros(),ones(), fill()方法生成数据
STC8H开发(十五): GPIO驱动Ci24R1无线模块
编译原理之文法
TRUNCATE表之后空间未释放
Usage of placeholder function in Tensorflow
How to Make Your Company Content GDPR Compliant
Interpretation of the paper (DropEdge) "DropEdge: Towards Deep Graph Convolutional Networks on Node Classification"
Xiaohei leetcode's refreshing rainy day trip, just finished eating Yufei Beef Noodles, Mala Tang and Beer: 112. Path Sum
Interpretation of the paper (DropEdge) "DropEdge: Towards Deep Graph Convolutional Networks on Node Classification"
String hashing (2014 SERC J question)
“稚晖君”为2022昇腾AI创新大赛打call 期待广大开发者加入
TF使用constant生成数据
JSON 基本使用
navicat 快捷键