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

使用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
    希望对你有帮助

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

报告相同问题?

悬赏问题

  • ¥50 易语言把MYSQL数据库中的数据添加至组合框
  • ¥20 求数据集和代码#有偿答复
  • ¥15 关于下拉菜单选项关联的问题
  • ¥20 java-OJ-健康体检
  • ¥15 rs485的上拉下拉,不会对a-b<-200mv有影响吗,就是接受时,对判断逻辑0有影响吗
  • ¥15 使用phpstudy在云服务器上搭建个人网站
  • ¥15 应该如何判断含间隙的曲柄摇杆机构,轴与轴承是否发生了碰撞?
  • ¥15 vue3+express部署到nginx
  • ¥20 搭建pt1000三线制高精度测温电路
  • ¥15 使用Jdk8自带的算法,和Jdk11自带的加密结果会一样吗,不一样的话有什么解决方案,Jdk不能升级的情况