npm下载pnpm

一、提供node_global和node_cache的文件夹

若不存在,可自行新建文件夹

二、配置环境变量

配置NODE_PATH变量:

配置Path变量:

三、执行cmd指令

powershell 复制代码
npm config set prefix "D:\Configure\nodejs\node_global"
npm config set cache "D:\Configure\nodejs\node_cache"
npm install pnpm -g

pnpm下载成功:

四、pnpm下载相关库

powershell 复制代码
## 方式一
pnpm install xxx 
## 方式二
pnpm install xxx --registry= 镜像库(如淘宝镜像库)

如下载: html-docx-js-typescript

powershell 复制代码
pnpm install html-docx-js-typescript --registry=https://registry.npmmirror.com

其他小知识:

淘宝镜像源地址由 https://registry.npm.taobao.org 已替换为 https://registry.npmmirror.com

相关推荐
人工智能训练师1 天前
Ubuntu22.04如何安装新版本的Node.js和npm
linux·运维·前端·人工智能·ubuntu·npm·node.js
Seveny071 天前
pnpm相对于npm,yarn的优势
前端·npm·node.js
yddddddy1 天前
css的基本知识
前端·css
昔人'1 天前
css `lh`单位
前端·css
Nan_Shu_6141 天前
Web前端面试题(2)
前端
知识分享小能手1 天前
React学习教程,从入门到精通,React 组件核心语法知识点详解(类组件体系)(19)
前端·javascript·vue.js·学习·react.js·react·anti-design-vue
蚂蚁RichLab前端团队1 天前
🚀🚀🚀 RichLab - 花呗前端团队招贤纳士 - 【转岗/内推/社招】
前端·javascript·人工智能
孩子 你要相信光1 天前
css之一个元素可以同时应用多个动画效果
前端·css
huangql5201 天前
npm 发布流程——从创建组件到发布到 npm 仓库
前端·npm·node.js
Days20501 天前
LeaferJS好用的 Canvas 引擎
前端·开源