nodejs 007:错误npm error Error: EPERM: operation not permitted, symlink

完整错误信息

  • npm error Error: EPERM: operation not permitted, symlink

    npm warn cleanup Failed to remove some directories [
    npm warn cleanup [
    npm warn cleanup 'C:\Users\kingchuxing\Documents\IPFS\orbit-db-set-master\node_modules\ipfs-cli',
    npm warn cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\kingchuxing\Documents\IPFS\orbit-db-set-master\node_modules\ipfs-cli\dist\src'] {
    npm warn cleanup errno: -4048,
    npm warn cleanup code: 'EPERM',
    npm warn cleanup syscall: 'rmdir',
    npm warn cleanup path: 'C:\Users\kingchuxing\Documents\IPFS\orbit-db-set-master\node_modules\ipfs-cli\dist\src'
    npm warn cleanup }
    npm warn cleanup ],
    npm warn cleanup [
    npm warn cleanup 'C:\Users\kingchuxing\Documents\IPFS\orbit-db-set-master\node_modules\@libp2p\record',
    npm warn cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\kingchuxing\Documents\IPFS\orbit-db-set-master\node_modules@libp2p\record\node_modules'] {
    npm warn cleanup errno: -4048,
    npm warn cleanup code: 'EPERM',
    npm warn cleanup syscall: 'rmdir',
    npm warn cleanup path: 'C:\Users\kingchuxing\Documents\IPFS\orbit-db-set-master\node_modules\@libp2p\record\node_modules'
    npm warn cleanup }
    npm warn cleanup ]
    npm warn cleanup ]
    npm error code 1
    npm error path C:\Users\kingchuxing\Documents\IPFS\orbit-db-set-master\node_modules\go-ipfs-dep
    npm error command failed
    npm error command C:\windows\system32\cmd.exe /d /s /c node src/bin.js
    npm error FetchError: request to https://dist.ipfs.io/go-ipfs/versions failed, reason:
    npm error Download failed!
    npm error A complete log of this run can be found in: C:\Users\kingchuxing\AppData\Local\npm-cache_logs\2024-09-13T10_06_29_384Z-debug-0.log
    PS C:\Users\kingchuxing\Documents\IPFS\orbit-db-set-master>

解决方法

  • 网上查到的cache clean命令解决方案不起作用:

    rm -rf node_modules // 删除node_modules目录
    npm cache clean --force
    npm install

  • 以管理员身份安装即可正常运行

  • 运行结果

相关推荐
恋猫de小郭8 分钟前
Flutter A2UI 的正确用法,怎么把 AI 和动态 UI 结合有效生产
android·前端·flutter
程序员-珍17 分钟前
安卓开发:同名 styles.xml 在不同分支/文件夹的合并规则
android·xml·前端
Ashley的成长之路23 分钟前
前端性能优化实战手册·第5篇(最终篇):性能监控与 CI/CD 集成
前端·ci/cd·性能优化
__zRainy__24 分钟前
Node系列 · Node基础:https 模块
后端·网络协议·http·https·node.js
chemddd34 分钟前
第四节课:前端
前端
雪芽蓝域zzs37 分钟前
(一)Vue3+JS+Vite+pnpm 仿若依后台 从零搭建
前端
常宇佳1 小时前
vue3 $refs使用方法
前端·vue.js·typescript
zhanghaha13141 小时前
HTML系列教程:4_什么是 HTML 元素(零基础超详细讲解)
前端·算法·html
AI 编程助手GPT2 小时前
VS Code 1.133 实战:Claude 可免 GitHub 登录,HTML 保存后自动刷新
前端·html·github
灯澜忆梦2 小时前
【基于GO的Web开发3】gin框架_HTML渲染
前端·golang·gin