现象 由于使用npm config set registry 切换淘宝源时,把地址打错了。 后面使用pnpm install 时出现 此时无论我怎么使用npm config set registry 或者pnpm config set registry 切回正确的源均没有效果。 解决 在其他用npm的项目运行一下npm i 再运行pnpm i 即可解决。