解决vite+vue3项目npm装包失败

报错如下:

Failed to remove some directories [

npm WARN cleanup [

npm WARN cleanup 'D:\\V3Work\\v3project\\node_modules\\@vue',

npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'D:\V3Work\v3project\node_modules\@vue\reactivity\dist'] {

npm WARN cleanup errno: -4048,

npm WARN cleanup code: 'EPERM',

npm WARN cleanup syscall: 'rmdir',

npm WARN cleanup path: 'D:\\V3Work\\v3project\\node_modules\\@vue\\reactivity\\dist'

npm WARN cleanup }

npm WARN cleanup ],

npm WARN cleanup [

npm WARN cleanup 'D:\\V3Work\\v3project\\node_modules',

npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'D:\V3Work\v3project\node_modules\@babel\parser\lib\parser'] {

npm WARN cleanup errno: -4048,

npm WARN cleanup code: 'EPERM',

npm WARN cleanup syscall: 'rmdir',

npm WARN cleanup path: 'D:\\V3Work\\v3project\\node_modules\\@babel\\parser\\lib\\parser'

npm WARN cleanup }

npm WARN cleanup ]

npm WARN cleanup ]

npm ERR! code E404

npm ERR! 404 Not Found - GET https://repo.huaweicloud.com/repository/npm/magic-string/-/magic-string-0.30.2.tgz

npm ERR! 404

npm ERR! 404 'magic-string@https://repo.huaweicloud.com/repository/npm/magic-string/-/magic-string-0.30.2.tgz' is not in this registry.

npm ERR! 404

npm ERR! 404 Note that you can also install from a

npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in: C:\Users\HTHT\AppData\Local\npm-cache\_logs\2023-08-03T08_26_51_647Z-debug-0.log

如下图:

删除C:\Users\admin下的.npmrc文件。

相关推荐
小安驾到3 小时前
【前端的坑】vxe-grid表格tooltip提示框不显示bug
前端·vue.js
去码头整点薯条983 小时前
python第五次作业
linux·前端·python
沐墨染3 小时前
Vue实战:自动化研判报告组件的设计与实现
前端·javascript·信息可视化·数据分析·自动化·vue
毕设源码-朱学姐3 小时前
【开题答辩全过程】以 基于Node.js的书籍分享平台设计与实现为例,包含答辩的问题和答案
node.js
局外人LZ4 小时前
Uniapp脚手架项目搭建,uniapp+vue3+uView pro+vite+pinia+sass
前端·uni-app·sass
爱上妖精的尾巴4 小时前
8-5 WPS JS宏 match、search、replace、split支持正则表达式的字符串函数
开发语言·前端·javascript·wps·jsa
为什么不问问神奇的海螺呢丶5 小时前
n9e categraf redis监控配置
前端·redis·bootstrap
云飞云共享云桌面5 小时前
推荐一些适合10个SolidWorks设计共享算力的服务器硬件配置
运维·服务器·前端·数据库·人工智能
咔咔一顿操作5 小时前
轻量无依赖!autoviwe 页面自适应组件实战:从安装到源码深度解析
javascript·arcgis·npm·css3·html5
刘联其5 小时前
.net也可以用Electron开发跨平台的桌面程序了
前端·javascript·electron