npm 源
node version Manage:
- nvm https://github.com/nvm-sh/nvm
- nvm-windows https://github.com/coreybutler/nvm-windows
- n(仅 Mac 和 Linux)https://github.com/tj/n
- nvs https://github.com/jasongin/nvs
- fnm https://github.com/Schniz/fnm
- nodenv
- volta
sh
pnpm get registry
pnpm config set registry https://registry.npmmirror.com
pnpm config set registry https://registry.npmjs.org/sh
npm config get registry
npm config set registry https://registry.npmmirror.com
npm config set registry https://registry.npmjs.org/
npm install --registry https://registry.npmmirror.comsh
yarn config get registry
yarn config set registry https://registry.npmmirror.com
yarn config set registry https://registry.yarnpkg.comnvm-windows 淘宝镜像
打开安装目录,默认在 C:\Users\用户名\AppData\Roaming\nvm
打开 settings.txt 然后 添加 淘宝镜像
node_mirror: https://npmmirror.com/mirrors/node/
npm_mirror: https://npmmirror.com/mirrors/npm/windows 脚本 问题
npm : 无法加载文件 C:\nvm4w\nodejs\npm.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fw link/?LinkID=135170 中的 about_Execution_Policies。
管理员 打开 powershell
sh
set-executionpolicy remotesigned选择 A
