npm install 报4058解决方法

npm ERR! path C:\irrelevent\path\project\node_modules\ansi-styles
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\irrelevent\path\project\node_modules\ansi-styles' -> 'C:\irrelevent\path\project\.ansi-styles.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

当时百度查看了好多的方法,最后都没解决

处理方法

  • 删除package-lock.json并再次运行NPM。

大家可以试一下

猜你喜欢

转载自blog.csdn.net/weixin_43167662/article/details/130606501