Laravel+Breeze项目导入@inertia/inertia出现Vite解析错误
解决Vite无法解析@inertia/inertia的问题
问题出在你的项目缺少@inertia/inertia核心依赖包——你当前的package.json里只安装了Inertia的Vue3适配器@inertiajs/vue3,但核心库并未安装,导致Vite找不到对应的模块。
解决步骤:
- 在项目根目录执行安装命令:
若使用Yarn则执行:npm install @inertia/inertiayarn add @inertia/inertia - 重启Vite开发服务器(关闭当前
npm run dev进程后重新启动) - 再次访问仪表盘页面,导入错误即可消除
内容的提问来源于stack exchange,提问作者Filipe Ferradeira
相关产品推荐
相关产品推荐

