之前使npm install 正常
突然就报如下错误
D:codemyNode>npm install axios
npm WARN checkPermissions Missing write access to D:codemyNode
ode_modulesms
npm WARN checkPermissions Missing write access to D:codemyNode
ode_modulesdebug
npm WARN checkPermissions Missing write access to D:codemyNode
ode_modulesis-buffer
npm WARN mynode@1.0.0 No repository field.
npm ERR! path D:codemyNode
ode_modulesms
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access 'D:codemyNode
ode_modulesms'
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:UserslaryAppDataRoaming
pm-cache\_logs2019-01-07T02_23_08_540Z-debug.log
D:codemyNode>npm update
尝试升级node版本也不行
然后查阅资料结论:
解决办法
删除掉 C:UsersddAppDataRoaming pm-cache
C:UsersddAppDataRoaming pm 两个文件夹 重新执行 npm install -g
我删掉了npm-cache文件后,再执行install 相关命令 OK