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

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

报告相同问题?

悬赏问题

  • ¥15 Stata链式中介效应代码修改
  • ¥15 latex投稿显示click download
  • ¥15 请问读取环境变量文件失败是什么原因?
  • ¥15 在若依框架下实现人脸识别
  • ¥15 添加组件无法加载页面,某块加载卡住
  • ¥15 网络科学导论,网络控制
  • ¥15 利用Sentinel-2和Landsat8做一个水库的长时序NDVI的对比,为什么Snetinel-2计算的结果最小值特别小,而Lansat8就很平均
  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错