vue项目安装依赖报错了

学习笔记 yekong 778℃
This modules directory was created using the following registries configuration: {"default":"https://registry.npmjs.org/"}. The current configuration is {"default":"https://registry.npmmirror.com/"}. To recreate the modules directory using the new settings, run "pnpm install".

这个提示意味着你当前的 node_modules 目录是根据一个不同的 NPM 源(registry)创建的,这个源是 https://registry.npmjs.org/。现在你的配置文件里设置的源已经改为 https://registry.npmmirror.com/

要解决这个问题并确保所有依赖项与你现在的配置匹配,你需要运行 pnpm install 命令以重新生成 node_modules 目录。

这样做通常是为了确保依赖项的一致性,以及避免由于源不同导致的潜在问题。

删除目录 node_modules 重新安装依赖即可。

喜欢 (0)