引入echarts报错:Error: operation not permitted -4048

按照官方文档引入echarts,npm install echarts --save,报如下错误:

D:\bishe>npm install echarts --save
npm WARN tarball tarball data for echarts@latest (sha1-Wzh1pML5HjkpQl+rq56s5+QJiz8=) seems to be corrupted. Trying one more time.
npm WARN vue-admin-template@4.2.1 No repository field.

npm ERR! path D:\inspur\bishe\node_modules\.staging\echarts-62f65443\dist\echarts.min.js
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'D:\inspur\bishe\node_modules\.staging\echarts-62f65443\dist\echarts.min.js'
npm ERR!  { [Error: EPERM: operation not permitted, unlink 'D:\inspur\bishe\node_modules\.staging\echarts-62f65443\dist\echarts.min.js']
npm ERR!   cause:
npm ERR!    { Error: EPERM: operation not permitted, unlink 'D:\inspur\bishe\node_modules\.staging\echarts-62f65443\dist\echarts.min.js'
npm ERR!      errno: -4048,
npm ERR!      code: 'EPERM',
npm ERR!      syscall: 'unlink',
npm ERR!      path:
npm ERR!       'D:\\inspur\\bishe\\node_modules\\.staging\\echarts-62f65443\\dist\\echarts.min.js' },
npm ERR!   stack:
npm ERR!    'Error: EPERM: operation not permitted, unlink \'D:\\inspur\\bishe\\node_modules\\.staging\\echarts-62f65443\\dist\\echarts.min.js\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'unlink',
npm ERR!   path:
npm ERR!    'D:\\inspur\\bishe\\node_modules\\.staging\\echarts-62f65443\\dist\\echarts.min.js',
npm ERR!   parent: 'bishe' }
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!     D:\Asoftware\node_cache\_logs\2020-03-26T02_41_36_801Z-debug.log

经检查发现是网络问题,连接个人热点后执行npm uninstall echarts卸载残留,然后npm install echarts --save即可。

发布了24 篇原创文章 · 获赞 5 · 访问量 6795
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 游动-白 设计师: 上身试试

分享到微信朋友圈

×

扫一扫,手机浏览