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

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

  • 运行结果

相关推荐
GISHUB10 分钟前
mapbox开发小技巧
前端·mapbox
几度泥的菜花33 分钟前
使用jQuery实现动态下划线效果的导航栏
前端·javascript·jquery
思茂信息1 小时前
CST直角反射器 --- 距离多普勒(RD图), 毫米波汽车雷达ADAS
前端·人工智能·5g·汽车·无人机·软件工程
星星不打輰1 小时前
Vue入门常见指令
前端·javascript·vue.js
好_快1 小时前
Lodash源码阅读-isNative
前端·javascript·源码阅读
好_快2 小时前
Lodash源码阅读-reIsNative
前端·javascript·源码阅读
好_快2 小时前
Lodash源码阅读-baseIsNative
前端·javascript·源码阅读
好_快2 小时前
Lodash源码阅读-toSource
前端·javascript·源码阅读
Oneforlove_twoforjob2 小时前
volta node npm yarn下载安装
前端·npm·node.js
咖啡の猫2 小时前
npm与包
前端·npm·node.js