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

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

  • 运行结果

相关推荐
石小石Orz2 小时前
我发现了开发者AI产品营收的新方向
前端·虚拟现实
老马识途2.02 小时前
关于跨域问题的总结
java·前端
别惊醒渔人4 小时前
Vue3 Diff 优化:最长递增子序列 LIS
前端·javascript·vue.js
颜酱4 小时前
07 | 把字段与指标同步到 Qdrant(生成阶段)
前端·人工智能·后端
用户059540174464 小时前
把AI长期记忆测试从手动验证换成pytest,2天揪出11个隐藏Bug
前端·css
特立独行的猫a5 小时前
鸿蒙PC Node.js三方库移植的AI移植框架与社区贡献完整流程
华为·node.js·harmonyos·三方库移植·鸿蒙pc
lichenyang4535 小时前
从 Vite 空项目到 AIGC 图片工作台:我如何打通生图、任务轮询、生成库与 Canvas 动态特效
前端·人工智能
AI 编程助手GPT5 小时前
Cursor Router 上线后,我用 Node.js 实现了一个可解释的模型路由器
node.js
泡沫冰@6 小时前
上章节中文件的讲解
前端·网络·nginx
进击的丸子6 小时前
APP人脸识别增值版Harmony Demo实操与关键代码解析
前端·程序员·harmonyos