当前位置:网站首页>cnpm安装步骤
cnpm安装步骤
2022-07-30 21:33:00 【bhegi_seg】
安装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
就可以了
先自我介绍一下,小编13年上师交大毕业,曾经在小公司待过,去过华为OPPO等大厂,18年进入阿里,直到现在。深知大多数初中级java工程师,想要升技能,往往是需要自己摸索成长或是报班学习,但对于培训机构动则近万元的学费,着实压力不小。自己不成体系的自学效率很低又漫长,而且容易碰到天花板技术停止不前。因此我收集了一份《java开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担。添加下方名片,即可获取全套学习资料哦
边栏推荐
- Simple configuration of three-tier architecture
- ELF:加载过程
- Image Restoration by Estimating Frequency Distribution of Local Patches
- 解决centos8 MySQL密码问题ERROR 1820 (HY000) You must reset your password using ALTER USER
- [Limited Time Bonus] 21-Day Learning Challenge - MySQL from entry to mastery
- Generate OOM records in a production environment. Conclusion: Don't be lazy to query useless fields unless you are completely sure.
- QUALITY-GATED CONVOLUTIONAL LSTM FOR ENHANCING COMPRESSED VIDEO
- 【限时福利】21天学习挑战赛 - MySQL从入门到精通
- Solve the problem of centos8 MySQL password ERROR 1820 (HY000) You must reset your password using the ALTER USER
- The structure of knowledge in the corners of the C language
猜你喜欢
MySQL 有这一篇就够(呕心狂敲37k字,只为博君一点赞!!!)
大家都在用的plm项目管理软件有哪些
MySQL cursors
Deep Non-Local Kalman Network for VideoCompression Artifact Reduction
DPW-SDNet: Dual Pixel-Wavelet Domain Deep CNNsfor Soft Decoding of JPEG-Compressed Images
vlan简单实验
Markdown的使用
基于ABP实现DDD--领域逻辑和应用逻辑
[Deep Learning] Target Detection | SSD Principle and Implementation
MySQL 用户授权
随机推荐
外包干了三年,废了...
NEOVIM下载安装与配置
DPW-SDNet: Dual Pixel-Wavelet Domain Deep CNNsfor Soft Decoding of JPEG-Compressed Images
冲刺第六周
Deep Kalman Filter Network for Video Compression Artifact Removal
opencv,numpy,tensor格式转换
[Deep Learning] Understanding of Domain Adaptation in Transfer Learning and Introduction of 3 Techniques
Apache DolphinScheduler新一代分布式工作流任务调度平台实战-
Uni-app 小程序 App 的广告变现之路:激励视频广告
mysql创建表
MySQL删除表数据 MySQL清空表命令 3种方法
MySQL user authorization
mpls简介
Image Restoration by Estimating Frequency Distribution of Local Patches
【限时福利】21天学习挑战赛 - MySQL从入门到精通
navicat连接MySQL报错:1045 - Access denied for user ‘root‘@‘localhost‘ (using password YES)
MySql创建数据表
3 minutes to take you to understand WeChat applet development
在IDEA中使用JUnit4和JUnitGenerator V2.0自动生成测试模块
How strict Typescript strict mode?