npm ERR! code ETARGET npm ERR! notarget No matching version found for postcss-modules-local-by-default@^4.0.1. npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\lushuhong\AppData\Local\npm-cache\_logs\2023-05-22T15_48_56_011Z-debug-0.log ERROR Error: command failed: npm install --loglevel error --legacy-peer-deps Error: command failed: npm install --loglevel error --legacy-peer-deps at ChildProcess.<anonymous> (C:\Users\lushuhong\AppData\Roaming\npm\node_modules\@vue\cli\lib\util\executeCommand.js:138:16) at ChildProcess.emit (node:events:513:28) at cp.emit (C:\Users\lushuhong\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\cross-spawn\lib\enoent.js:34:29) at maybeClose (node:internal/child_process:1091:16) at ChildProcess._handle.onexit (node:internal/child_process:302:5)
时间: 2023-07-15 07:11:52 浏览: 166
npm ERR! code EPERM npm ERR! syscall open npm ERR! path C:\Program Files\nodejs\node_cache\_cacache\
5星 · 资源好评率100%
这个错误提示是在安装 postcss-modules-local-by-default 包时出现了问题,可能是该包的版本与你的依赖项不兼容导致的。建议您先尝试清除 npm 缓存,然后再重新安装该包和其他依赖项:
1.运行命令清除 npm 缓存:
```
npm cache clean --force
```
2.删除 `node_modules` 和 `package-lock.json` 文件:
```
rm -rf node_modules
rm package-lock.json
```
3.重新安装依赖项:
```
npm install
```
如果问题仍然存在,可以尝试升级或降级 postcss-modules-local-by-default 包的版本,或者检查其他依赖项是否有版本兼容性问题。
阅读全文