当前位置:网站首页>cnpm安装步骤
cnpm安装步骤
2022-07-30 04:15:00 【m0_54861649】
安装nodeJS
官网下载:http://nodejs.cn/download/
选择其他版本下载地址:https://nodejs.org/zh-cn/download/releases/
选版本点击下载
然后下载后缀名为msi,因为安装简单
选择好地址后无脑安装
二 、创建文件夹
安装完成后我们打开它的目录创建两个文件夹(后面配置环境变量需要)
node_cache
node_global
三 、配置npm的全局模块的存放路径、cache的路径
win+r 输入cmd 打开命令提示符窗口,输入:
npm config set prefix "选择刚刚创建node_global文件路径"
npm config set cache "选择刚刚创建node_cache文件路径"
注意: 路径需要加上双引号,如图:
四:在命令行输入以下命令安装express(注:“-g”表示安装到global目录下,就是上面设置的node_global中)
这步操作能证明后面下载的cnpm会在这个目录
npm install express -g

然后我们打开nodejs的安装目录,找到创建的node_global文件夹下面node_modules的,看看有没有刚刚下载的express
五、配置环境变量
在系统环境变量添加刚刚创建的node_global文件夹下面node_modules
六、下载cnpm
在命令行继续输入:
npm install -g cnpm --registry=https://registry.npm.taobao.org

为了以后下载不需要加上registry=https://registry.npm.taobao.org
继续数据命令:
npm config set registry http://registry.npm.taobao.org
然后运行cnpm -v
是因为系统变量path并未包含cnpm。在系统变量path下添加该路径即可正常使用cnpm。
添加系统环境变量

添加用户变量
然后重新打开命令提示符
输入
cnpm -v
就可以了
边栏推荐
- mysql 结构、索引详解
- golang中如何比较struct,slice,map是否相等以及几种对比方法的区别
- The leap second that may cause the next "Millennium Bug" is boycotted by tech giants
- Forum management system
- 权值线段树+线段树分裂/合并+CF1659D
- Reverse Analysis Practice 2
- 网页元素解析a标签
- 弘玑再度入围Gartner 2022 RPA魔力象限并实现位置大幅跃升
- Pytorch框架学习记录5——DataLoader的使用
- How does the Snapdragon 7 series chip perform?Reno8 Pro proves a new generation of God U
猜你喜欢

【C语言】程序环境和预处理

Mini Program Graduation Works WeChat Points Mall Mini Program Graduation Design Finished Work (7) Interim Inspection Report

Charles 替换 接口响应信息

Mini Program Graduation Works WeChat Second-hand Trading Mini Program Graduation Design Finished Works (6) Question Opening Reply PPT

逆向理论知识3【UI修改篇】

Pytorch framework learning record 2 - the use of TensorBoard

Is the end of the universe a bank?Talk about those things about doing software testing in the bank

The implementation and basic operation of sub-database sub-table, ER table, global table, fragmentation rules, global sequence, etc. in MyCat

Mini Program Graduation Works WeChat Second-hand Trading Mini Program Graduation Design Finished Work (2) Mini Program Function

Charles replaces the interface response information
随机推荐
Mysql版本升级,直接复制Data文件,查询特别慢
Uptime Monitoring: How to Ensure Network Device Uptime
spicy (two) unit hooks
mysql structure, index details
JQ源码分析(环境处理)
Go书籍大全-从初级到高级以及Web开发
Eureka Registry
Advanced [C] array to participate in the function pointer
Boss Rush (二分答案 + 状压DP)
Pytorch framework to study record 6 - the torch. Nn. The Module and the torch nn. Functional. The use of conv2d
Usage of exists in sql
骁龙7系芯片表现如何?Reno8 Pro佐证新一代神U
Reverse Analysis Practice 2
ospf map
Pytorch framework learning record 7 - convolutional layer
Pytorch框架学习记录6——torch.nn.Module和torch.nn.functional.conv2d的使用
权值线段树+线段树分裂/合并+CF1659D
CMake installation and testing
WEB 渗透之信息收集
The difference between BGP room and ordinary room in Beijing