美文网首页
vscode使用npm安装依赖报错

vscode使用npm安装依赖报错

作者: storyWrite | 来源:发表于2022-03-17 18:21 被阅读0次

    1.报错信息

    npm ERR! code EPERM
    npm ERR! syscall open
    npm ERR! path C:\Node\node_cache_cacache\index-v5\4b\d5\ac02d8eac51f5c368b18a948d14b7ba882d43e6f4cafddbf9dda740d2afa
    npm ERR! errno -4048
    npm ERR! Error: EPERM: operation not permitted, open 'C:\Node\node_cache_cacache\index-v5\4b\d5\ac02d8eac51f5c368b18a948d14b7ba882d43e6f4cafddbf9dda740d2afa'
    npm ERR! [Error: EPERM: operation not permitted, open 'C:\Node\node_cache_cacache\index-v5\4b\d5\ac02d8eac51f5c368b18a948d14b7ba882d43e6f4cafddbf9dda740d2afa'] {
    npm ERR! errno: -4048,
    npm ERR! code: 'EPERM',
    npm ERR! syscall: 'open',
    npm ERR! path: 'C:\Node\node_cache\_cacache\index-v5\4b\d5\ac02d8eac51f5c368b18a948d14b7ba882d43e6f4cafddbf9dda740d2afa',
    npm ERR! requiredBy: '.'
    npm ERR! }
    npm ERR!
    npm ERR! The operation was rejected by your operating system.
    npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
    npm ERR! or that you lack permissions to access it.
    npm ERR!
    npm ERR! If you believe this might be a permissions issue, please double-check the
    npm ERR! permissions of the file and its containing directories, or try running


    image.png

    2.原因

    操作权限不足,此处截图在终端打开,与vscode打开相同,终端采用管理员权限打开,一样可以正常安装

    3.解决

    使用管理员身份打开vscode

    相关文章

      网友评论

          本文标题:vscode使用npm安装依赖报错

          本文链接:https://www.haomeiwen.com/subject/lhxbdrtx.html