当前位置:网站首页>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
边栏推荐
猜你喜欢
MySql模糊查询大全
Concurrent Programming Review
黄金圈法则:成功者必备的深度思考方法
[Image processing] Image skeleton extraction based on central axis transformation with matlab code
Teach you how to design a CSDN system
从底层结构开始学习FPGA(6)----分布式RAM(DRAM,Distributed RAM)
Programmers make money and practice, teach you how to do paid courses, self-media, paid articles and paid technical courses to make money
curl (7) Failed connect to localhost8080; Connection refused
Path dependence: the poor hard science to counter attack breakthrough
navicat新建数据库
随机推荐
[GO语言基础] 一.为什么我要学习Golang以及GO语言入门普及
JVM 垃圾回收 超详细学习笔记(二)
从底层结构开始学习FPGA(6)----分布式RAM(DRAM,Distributed RAM)
从字节码角度带你彻底理解异常中catch,return和finally,再也不用死记硬背了
应用实践 | Apache Doris 在百度智能云计费账单系统的应用实践
报错:npm ERR code EPERM
手把手教你设计一个CSDN系统
"Hou Lang" programmer version, a speech dedicated to a new generation of programmers, He Bing's "Hou Lang" speech imitation show
[Koltin Flow (1)] Five ways to create flow
坠落的蚂蚁(北京大学考研机试题)
分布式事务之 Atomikos 原理和使用(一)
2022年比若依更香的开源项目
MySQL的 DDL和DML和DQL的基本语法
手把手教你彻底卸载MySQL
从想当亿万富翁到职场、创业、爱情、抑郁、学医学武,我的程序人生
mysql basics (4)
cnpm安装步骤
Teach you to completely uninstall MySQL
nacos-2.0.3启动报错出现no datasource set的坑
mysql 时间字段默认设置为当前时间