Nothing to stop. No server is running for the store at /Users/pan/Library/pnpm/store/v3 ERR_PNPM_REGISTRIES_MISMATCH This modules directory was created using the following registries configuration: {"default":"https://registry.npmmirror.com/"}. The current configuration is {"default":"http://192.168.2.10:4873/"}. To recreate the modules directory using the new settings, run "pnpm install".
这个错误信息表示你当前的pnpm设置与创建模块目录时的设置不一致。你可以按照以下步骤尝试解决此问题:
-
删除
node_modules
目录和pnpm-lock.yaml
文件(如果存在):bashCopy code rm -rf node_modules rm pnpm-lock.yaml
-
更新你的pnpm设置以使用正确的npm镜像源。根据报错信息,你需要更改为之前使用的镜像源(https://registry.npmmirror.com/)。你可以使用以下命令更改设置:
arduinoCopy code pnpm config set registry https://registry.npmmirror.com/
-
重新运行
pnpm install
以根据新设置重新创建模块目录:Copy code pnpm install
完成这些步骤后,你应该可以正常使用pnpm add -g pnpm
命令了。如果问题仍然存在,请检查你的网络连接并确保你能够访问配置的npm镜像源。