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

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

  • 运行结果

相关推荐
白鸽(二般)5 分钟前
HTML、CSS、JavaScript
前端·css
大强的博客24 分钟前
《Vue Router实战教程》22.导航故障
前端·javascript·vue.js
会蹦的鱼42 分钟前
知识了解02——了解pnpm+vite+turbo+monorepo的完整构建步骤(react子项目)
前端·javascript·react.js
@PHARAOH43 分钟前
HOW - 如何测试 React 代码
前端·react.js·前端框架
涵信43 分钟前
第三节:React 基础篇-React组件通信方案
前端·javascript·react.js
90后的晨仔1 小时前
Flutter 报错 [☠] Network resources (the doctor check crashed)xxxx
前端·flutter
Mintopia1 小时前
深入理解 Three.js 中的 WebGLRenderer
前端·javascript·three.js
Mintopia1 小时前
深入理解与使用 Node.js 的 http-proxy-middleware
javascript·node.js·express
HsuYang1 小时前
Nuxt框架学习(一)——从简单的SSR起步
前端·javascript·架构