You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Laravel+Breeze项目导入@inertia/inertia出现Vite解析错误

解决Vite无法解析@inertia/inertia的问题

问题出在你的项目缺少@inertia/inertia核心依赖包——你当前的package.json里只安装了Inertia的Vue3适配器@inertiajs/vue3,但核心库并未安装,导致Vite找不到对应的模块。

解决步骤:

  • 在项目根目录执行安装命令:
    npm install @inertia/inertia
    
    若使用Yarn则执行:
    yarn add @inertia/inertia
    
  • 重启Vite开发服务器(关闭当前npm run dev进程后重新启动)
  • 再次访问仪表盘页面,导入错误即可消除

内容的提问来源于stack exchange,提问作者Filipe Ferradeira

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.30 18:31:01