我尝试更改我的 npm 版本以及 npm 更新。从 package.json 中删除了分辨率和预安装。也试过把package-lock.json文件去掉再安装,还是一样。
1.清除npm缓存:
有时,npm 缓存中的问题可能会导致意外行为。尝试通过运行清除 npm 缓存:
npm 缓存清理 -f
2.检查全局npm版本:
确保您的全局 npm 版本也是最新的。您可以使用以下方式更新它:
npm install -g npm@latest
3.使用--force标志:
您可以尝试使用 --force 标志强制 npm 重新安装所有软件包:
npm install --force
希望你能找到平安!