当前位置:网站首页>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
边栏推荐
- Use zeros(), ones(), fill() methods to generate data in TF
- In programming languages, the difference between remainder and modulo
- Use convert_to_tensor in Tensorflow to specify the type of data
- laravel table migration error [easy to understand]
- APP自动化测试框架-UiAutomator2基础入门
- Leetcode 93 复原IP地址
- 【stack】【queue】【priority_queue】【deque】Detailed explanation
- 小黑leetcode清爽雨天之旅,刚吃完宇飞牛肉面、麻辣烫和啤酒:112. 路径总和
- Deceptive Dice(期望计算)
- STC8H development (15): GPIO drive Ci24R1 wireless module
猜你喜欢
Interpretation of the paper (DropEdge) "DropEdge: Towards Deep Graph Convolutional Networks on Node Classification"
2022 首期线下 Workshop!面向应用开发者们的数据应用体验日来了 | TiDB Workshop Day
js十五道面试题(含答案)
Converting angles to radians
上海控安SmartRocket系列产品推介(三):SmartRocket iVerifier计算机联锁系统验证工具
The kvm virtual machine cannot be started, NOT available, and the PV is larger than the partition
ACM MM 2022 | Cloud2Sketch: Painting with clouds in the sky, AI brush strokes
Flask之路由(app.route)详解
nvm下node安装;node环境变量配置
万字总结:分布式系统的38个知识点
随机推荐
重要的不是成为海贼王,而是像路飞一样去冒险
TRUNCATE表之后空间未释放
Pagoda measurement - building LightPicture open source map bed system
In-depth analysis of Apache EventMesh cloud-native distributed event-driven architecture
Blender程序化建模简明教程【PCG】
TF使用constant生成数据
必看设计干货|易知微设计师是怎么做标准可视化设计服务的?
论文解读(DropEdge)《DropEdge: Towards Deep Graph Convolutional Networks on Node Classification》
2021(ICPC)亚洲区域赛昆明站(CGHIJLM)
SQLi-LABS Page-2 (Adv Injections)
SQLi-LABS Page-2 (Adv Injections)
【微服务~Nacos】Nacos服务提供者和服务消费者
[Cloud Native] 4.2 DevOps Lectures
JS解混淆-AST还原案例
Shanghai Konan SmartRocket series product introduction (3): SmartRocket iVerifier computer interlocking system verification tool
Leetcode 93 复原IP地址
数独 | 回溯-7
小黑leetcode之旅:94. 二叉树的中序遍历(补充Morris 中序遍历)
字符串哈希(2014 SERC J题)
AI+医疗:使用神经网络进行医学影像识别分析