您的位置:首页 > 文旅 > 美景 > nodejs 007:错误npm error Error: EPERM: operation not permitted, symlink

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

2024/10/6 1:41:03 来源:https://blog.csdn.net/ResumeProject/article/details/142217193  浏览:    关键词: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
  • 以管理员身份安装即可正常运行
    在这里插入图片描述
  • 运行结果
    在这里插入图片描述

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com