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

如何为Laravel 11项目重新安装最新版Vite

解决Vite重装时npm 404找不到@vitejs/plugin-laravel的问题
  • 你输入的插件包名错误,@vitejs/plugin-laravel并非官方存在的npm包,Laravel对应的Vite插件正确包名为laravel/vite-plugin
  • 执行正确的安装命令:
    npm install --save-dev vite laravel/vite-plugin
    
  • 如果执行后仍有问题,尝试以下操作:
    1. 切换npm官方源(避免第三方源同步延迟):
      npm config set registry https://registry.npmjs.org/
      
    2. 清理npm缓存后重新安装:
      npm cache clean --force
      npm install --save-dev vite laravel/vite-plugin
      

内容的提问来源于stack exchange,提问作者Zaid Abouqamar

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.15 13:09:50