新八建设集团有限公司网站,百盛联合建设集团有限公司网站,wordpress 主题 图,钟楼网站建设下载
地址#xff1a;https://nodejs.org/zh-cn/download/prebuilt-installer 安装包 开始安装 安装完成 给文件夹添加权限 创建两个文件夹
node_cache
node_global 更新环境变量
修改环境变量#xff0c;新的全局模块路径#xff0c;这样在任何位置运行命令时都…下载
地址https://nodejs.org/zh-cn/download/prebuilt-installer 安装包 开始安装 安装完成 给文件夹添加权限 创建两个文件夹
node_cache
node_global 更新环境变量
修改环境变量新的全局模块路径这样在任何位置运行命令时都能够访问到这些模块。
npm config set prefix D:\nodejs\node_global
npm config set cache D:\nodejs\node_cache 配置环境变量
将原来的用户变量- Path
D:\nodejs\node_global 手动创建【node_modules】文件夹 【系统变量】 添加Path–变量名NODE_PATH- 变量值D:\nodejs\node_global\node_modules 验证安装
win R 打开命令行输入 cmd 更换npm源为淘宝镜像源
1.先查看当前使用的镜像地址
npm config get registry 清空缓存切换新源
npm cache clean --force npm config set registry https://registry.npmmirror.com 国内镜像还有如下根据自己的需要使用
腾讯
npm config set http://mirrors.cloud.tencent.com/npm/ 华为
npm config set https://mirrors.huaweicloud.com/repository/npm/ 中科大镜像
npm config set https://registry.npmjs.org/ 查看更换成功
npm config get registry 在winR 输入cmd 窗口中输入以下命令测试能否正常使用
npm install express -g npm报错
xx packages are looking for funding run npm fund for details解决办法 解决方案这个打赏是资源的因此我们选择不打赏即在命令后面加 --no-fund 即可解决。
如本次执行的命令为npm i nodemon -g
则我们在命令后面加上 --no-fund 即可解决npm i nodemon -g --no-fund