当前位置:网站首页>The Node study notes
The Node study notes
2022-08-06 21:32:00 【bug manufacturing engineer!!!】
Node学习
安装Node
一、node.js下载
node.js下载地址:https://nodejs.org/en/

二、安装node.js
点击next

勾选接受条款,点击next

自定义安装位置,点击next

点击next

直接点击next

直接点击install


安装完成,Using the command line operation test installation was successful


环境配置
NodeAfter the general installation generally shippednpm
npm -v

环境配置
在nodejs安装的路径下,新增node_global和node_cache文件夹

修改npm 和 npm.cmd文件中配置信息
After will open2个文件里面的prefix -g替换为prefix --location=global

Is created after the above two empty folder,在cmd命令中,Enter the following command option
You must be aware of your own installation path!!!
npm config set prefix "D:\DevelopTools\NodeJS\node_global"
npm config set cache "D:\DevelopTools\NodeJS\node_cache

安装淘宝镜像:npm install -g cnpm --registry=https://registry.npm.taobao.org
系统环境变量设置
在环境变量 ——> 系统变量——>新建:变量名为 NODE_PATH, 值为D:\DevelopTools\NodeJS\node_global\node_modules

最后编辑用户变量里的Path,将相应npm的路径改为:D:\DevelopTools\NodeJS\node_global,如下:

测试
在cmd命令中执行命令:npm install webpack -g
After the completion of the execution effect whether the custom folder

webpack已安装成功,执行 npm webpack -v 可以看到所安装webpack的版本号:

View the current mirror warehouse:
npm config get registry

Set up taobao global mirror(以管理员身份运行CMD):

Set up taobao global mirror(以管理员身份运行CMD):
npm config set registry https://registry.npm.taobao.org
切换回默认地址
npm config set registry https://registry.npmjs.org/
使用nrm工具切换
切换淘宝源
npx nrm use taobao
切换回官方源
npx nrm use npm
安装cnpm
操作命令:npm install -g cnpm --registry=https://registry.npmmirror.com
检测:cnpm -v

查看全局安装的模块
npm list -g
查看某个模块的版本号
npm list vue
安装提定版本包
npm install [email protected]
更新到最新版的包
npm update jquery
卸载包
npm uninstall jquery
边栏推荐
- 【How to use Medooze to realize multi-party video conference】
- centos8部署opengauss数据库和Navicat连接(超详细简单化)
- 推荐一个全新硬件/嵌入式刷题网站!免费!好用!
- 【WPF】级联Combobox及其与ListView的联动
- From To C to To B and To G, how does Duoduoyun technology realize the transformation
- 硅谷课堂第十一课-公众号消息和微信授权
- 积极防御体系进阶:《DevSecOps敏捷安全》
- SimpleDateFormat常用格式代码一览
- distributed theory
- A simple preview image in uniapp
猜你喜欢

Liunx文件目录操作命令(cd、pwd、ls、mkdir、rmdir)

0x0000003b蓝屏什么原因 win7蓝屏0x0000003b怎么恢复

iQOO Neo6 evaluation: product strength has been steadily upgraded, a good choice at the same price

uniapp 九宫格抽奖功能效果demo(整理)

硅谷课堂第十五课-腾讯云部署

3. 栈基本概念、【顺序栈、共享栈 和 链栈】代码实现

硅谷课堂第五课-腾讯云对象存储和课程分类管理

【PyTorch量化实践(1)】

vscode 1.70变化与关注点(人工折叠/粘性滚动等)

分布式前修课:Redis实现分布式锁
随机推荐
Open legendary GM website
uniapp 左滑删除效果一、效果二(2个方式自选其一)(整理)
oracle associated table query with in associated query separated by characters comma separated
利用类加载器获取文件路径报错空指针异常
硅谷课堂第五课-腾讯云对象存储和课程分类管理
用户-角色-权限设计【笔记】
硅谷课堂第十二课-公众号点播课程和直播管理模块
话费优惠
uniapp Jiugongge lottery controllable probability effect demo (sorting)
【如何使用Medooze 实现多方视频会议】
内网渗透之Token令牌窃取
Redis 复习计划 - String内存开销问题以及基本/扩展数据类型的使用
s905l3a系列刷armbian 教你从0搭建自己的博客
公告|Gear 官方白皮书正式发布!
吃透Chisel语言.33.Chisel进阶之硬件生成器(二)——Chisel组合逻辑电路生成:以BCD编码表为例
】 【 mention test platform
多线程---进阶
Pytest learning-yaml+parametrize interface combat
EXT.js学习【笔记】
Reproduce one loop problem and two loop problems