npm install reported 4058 solution

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

At that time, Baidu checked a lot of methods, but in the end they didn't solve it.

Approach

  • Delete package-lock.jsonand run NPM again.

Everyone can try

Guess you like

Origin blog.csdn.net/weixin_43167662/article/details/130606501