当前位置:网站首页>cnpm installation steps
cnpm installation steps
2022-07-30 06:05:00 【burial】
Install nodeJS
Official website download: http://nodejs.cn/download/
Select other version download address:https://nodejs.org/zh-cn/download/releases/
Select the version and click to download
Then download the suffix nameFor msi, because the installation is simple
Select OKBrainless installation after address
Second, create a folder
After the installation is complete, we open its directory to create two folders (need to configure environment variables later)
node_cache
node_global
Third, configure the storage path and cache of the global module of npmThe path of
win+r enter cmd to open the command prompt window, enter:
npm config set prefix "Select the path to the node_global file just created"npm config set cache "select the path to the node_cache file just created"
Note: The path needs to be enclosed in double quotation marks, as shown in the figure:
Fourth: Enter the following command on the command line to install express (Note: "-g" means to install in the global directory, which is the node_global set above)
This stepIt can prove that the cnpm downloaded later will be in this directory
npm install express -g
Then we open the installation directory of nodejs, find the node_modules under the created node_global folder, and see if there is the express you just downloaded
Five, configure environment variables
Add node_modules under the node_global folder just created in the system environment variables
Six, download cnpm
atContinue to enter the command line:
npm install -g cnpm --registry=https://registry.npm.taobao.org
No need to add registry=https://registry.npm.taobao.org
Continue data command:
npm config set registry http://registry.npm.taobao.org
Then run cnpm -v
because the systemThe variable path does not contain cnpm.Add this path under the system variable path to use cnpm normally.
Add system environment variables
Add user variable
Then reopen the command prompt
Enter
cnpm -v
That's it
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
边栏推荐
猜你喜欢
go版本升级
互联网(软件)公司项目管理软件调研报告
Programmers care guide, give yourself a chance to make the occasional relaxation of body and mind
Within the SQL connection table (link connections, left or right, cross connection, full outer join)
Participate in open source, let programmers regain their blood and passion
从想当亿万富翁到职场、创业、爱情、抑郁、学医学武,我的程序人生
MySQL如何对SQL做prepare预处理(解决IN查询SQL预处理仅能查询出一条记录的问题)
[Image detection] Research on cumulative weighted edge detection method based on grayscale image with matlab code
WeChat payment and payment callback
The use of Conluce, an online document management system
随机推荐
程序员大保健指南,给自己的身心偶尔放松的机会
ClickHouse 数据插入、更新与删除操作 SQL
Machine Learning - Gradient Descent Optimization - C language implementation
2022 SQL big factory high-frequency practical interview questions (detailed analysis)
参与开源,让程序员找回热血和激情
倒计数(来源:Google Kickstart2020 Round C Problem A)(DAY 88)
cmd(命令行)操作或连接mysql数据库,以及创建数据库与表
WeChat payment and payment callback
MySQL - Function and Constraint Commands
ugly programmer
MySQL索引常见面试题(2022版)
2022年SQL经典面试题总结(带解析)
2022 Pengcheng Cup web
mysql基础(4)
MySQL如何对SQL做prepare预处理(解决IN查询SQL预处理仅能查询出一条记录的问题)
2022鹏城杯web
MySQL(3)
Docker-compose install mysql
MySQL fuzzy query performance optimization
坠落的蚂蚁(北京大学考研机试题)