npm install 失败报错:ENOENT errno -4058 npm ERR! syscall access

之前使npm install 正常

突然就报如下错误

D:\code\myNode>npm install axios
npm WARN checkPermissions Missing write access to D:\code\myNode\node_modules\ms
npm WARN checkPermissions Missing write access to D:\code\myNode\node_modules\debug
npm WARN checkPermissions Missing write access to D:\code\myNode\node_modules\is-buffer
npm WARN [email protected] No repository field.

npm ERR! path D:\code\myNode\node_modules\ms
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access 'D:\code\myNode\node_modules\ms'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\lary\AppData\Roaming\npm-cache\_logs\2019-01-07T02_23_08_540Z-debug.log

D:\code\myNode>npm update
尝试升级node版本也不行

然后查阅资料结论:

解决办法


删除掉 C:\Users\dd\AppData\Roaming\npm-cache\

C:\Users\dd\AppData\Roaming\npm\  两个文件夹 重新执行 npm install -g

我删掉了npm-cache文件后,再执行install 相关命令 OK

参考:https://yq.aliyun.com/ziliao/498627

你可能感兴趣的:(npm install 失败报错:ENOENT errno -4058 npm ERR! syscall access)