一、提供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