hcg1023 2019-03-03 20:53 采纳率: 50%
浏览 9553
已采纳

使用npm下载任何文件都报错,报错如下

D:\cumputer\Node_js\day_3_3>npm install --save jquery
npm WARN tarball tarball data for jquery@latest (sha1-lYzinoHJeQ8xvneS311NlfxX+8o=) seems to be corrupted. Trying one more time.
npm WARN cumputer@1.0.0 No description
npm WARN cumputer@1.0.0 No repository field.

npm ERR! path D:\cumputer\node_modules.staging\jquery-9ce1137a\dist\jquery.js
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'D:\cumputer\node_modules.staging\jquery-9ce1137a\dist\jquery.js'
npm ERR! { [Error: EPERM: operation not permitted, unlink 'D:\cumputer\node_modules.staging\jquery-9ce1137a\dist\jquery.js']
npm ERR! cause:
npm ERR! { Error: EPERM: operation not permitted, unlink 'D:\cumputer\node_modules.staging\jquery-9ce1137a\dist\jquery.js'
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path:
npm ERR! 'D:\cumputer\node_modules\.staging\jquery-9ce1137a\dist\jquery.js' },
npm ERR! stack:
npm ERR! 'Error: EPERM: operation not permitted, unlink \'D:\cumputer\node_modules\.staging\jquery-9ce1137a\dist\jquery.js
\'',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path:
npm ERR! 'D:\cumputer\node_modules\.staging\jquery-9ce1137a\dist\jquery.js',
npm ERR! parent: 'cumputer' }
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
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\22938\AppData\Roaming\npm-cache_logs\2019-03-03T12_51_08_378Z-debug.log

  • 写回答

1条回答 默认 最新

  • 关注

    你试试这两个命令
    npm config rm proxy
    npm config rm https-proxy
    希望对你有帮助

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 刚接触VFP,我想知道为什么是这种情况,有人可以看看吗
  • ¥15 io.jsonwebtoken.security.Keys
  • ¥15 急,ubuntu安装后no caching mode page found等
  • ¥15 联想交换机NE2580O/NE1064TO安装SONIC
  • ¥15 防火墙的混合模式配置
  • ¥15 Ubuntu不小心注销了要怎么恢复啊
  • ¥15 win10电脑安装完plcsim advanced4.0运行时为什么会提示找不到虚拟网卡
  • ¥15 安装powerbuilder10卡在安装程序正在运行这个页面 没有下一步任何指令
  • ¥15 关于mpi的问题:请问遇到这种情况需要怎么解决,出现这个问题后电脑不能进行mpi多核运行只能进行单核运行
  • ¥50 微信聊天记录备份到电脑提示成功了,但还是没同步到电脑微信