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

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

  • 运行结果

相关推荐
donecoding3 分钟前
Corepack 完全解析:从懵到懂,包管理器自由了
前端·node.js·前端工程化
yqcoder6 分钟前
端经典面试题:为什么 0.1 + 0.2 !== 0.3?
前端·css
ZC跨境爬虫11 分钟前
跟着 MDN 学 HTML day_12:(HTML网页图片嵌入)
前端·javascript·css·ui·html
光影少年17 分钟前
reeact虚拟DOM、Diff算法原理、key的作用与为什么不能用index
前端·react.js·掘金·金石计划
用户0595401744622 分钟前
大模型记忆存储踩坑实录:LangChain 的 ConversationBufferMemory 让我排查了 6 小时
前端·css
是上好佳佳佳呀29 分钟前
【前端(十二)】JavaScript 函数与对象笔记
前端·javascript·笔记
你真的快乐吗44 分钟前
@fuxishi/svg-icon:一个 Vue 3 svg本地图标+iconify图标组件库,让图标管理不再头疼
前端·vue.js·typescript
Rkgua1 小时前
ESModule和Commonjs模块的区别
前端·javascript
江南十四行1 小时前
ReAct Agent 基本理论与项目实战(二)
前端·react.js·前端框架
用户600071819101 小时前
【翻译】React 如何乱序流式输出 UI,却仍保持最终顺序
前端