当前位置: 首页 > news >正文

Error: spawn xdg-open ENOENT

报错:The CJS build of Vite’s Node API is deprecated. See
https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated
for more details.

VITE v5.1.4 ready in 2298 ms

➜ Local: http://localhost:80/ ➜ Network: http://10.0.4.13:80/
➜ press h + enter to show help node:events:491
throw er; // Unhandled ‘error’ event
^

Error: spawn xdg-open ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:476:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) Emitted ‘error’ event on
ChildProcess instance at:
at ChildProcess._handle.onexit (node:internal/child_process:289:12)
at onErrorNT (node:internal/child_process:476:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { errno: -2, code:
‘ENOENT’, syscall: ‘spawn xdg-open’, path: ‘xdg-open’,
spawnargs: [ ‘http://localhost:80/’ ] }

如果你的系统没有 apt-get 命令,可能是因为你使用的不是Debian系的Linux发行版(如Ubuntu),而是其他类型的Linux发行版,或者是Windows或macOS系统。以下是针对不同系统的解决方案:

对于不同的Linux版本,安装 xdg-utils 包
  • Red Hat系Linux(如Fedora、CentOS)

    sudo yum install xdg-utils
    

    在较新的系统上

    sudo dnf install xdg-utils
    
  • Arch系Linux

    sudo pacman -S xdg-utils
    
http://www.lryc.cn/news/369155.html

相关文章:

  • 写给大数据开发,如何去掌握数据分析
  • 大数据湖一体化运营管理建设方案(49页PPT)
  • 大模型训练的艺术:从预训练到增强学习的四阶段之旅
  • Linux 网络设置
  • 交易中的群体行为特征和决策模型
  • Android14之向build.prop添加属性(二百一十九)
  • Cargo
  • 大学生如何学习node.js?
  • 速盾:服务器遭受ddos攻击如何防御
  • docker-ce 和 docker-ee介绍版本介绍
  • [Java] TDengine时序数据库时间戳(timestamp)字段插入数据的实现方法
  • 我的mybatis学习笔记之二
  • 【网络编程开发】11.IO模型 12.IO多路复用
  • elementui Menu 二级菜单 min-width修改无效
  • 字符串拼接之char实现
  • 教育的数字化转型——Kompas.ai如何变革学习体验
  • 域内攻击 ----> DCSync
  • 前端 JS 经典:动态执行 JS
  • Laravel学习-模型注入
  • Django模板的使用(详细版)
  • 正则表达式基础
  • 【Linux】进程间通信之命名管道
  • 【内存管理】页表映射
  • Cloudpods 强大的多云管理平台部署
  • 深度学习的可微渲染
  • CAS Server Restful接口实现后台认证
  • Linux shell编程学习笔记58:cat /proc/mem 获取系统内存信息
  • 【InternLM实战营第二期笔记】07:OpenCompass :是骡子是马,拉出来溜溜
  • matlab演示银河系转动动画
  • 备战 清华大学 上机编程考试-冲刺前50%,倒数第5天