Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

peterdickins's avatar

Issue installing Vue into Laravel Project

I am trying to create a new project with Laravel backend and Vue front end, I want to use Breeze for basic API authentication. I am selecting API only for the Breeze install as I don't want to use Inertia.

This is what I have run:

curl -s "https://laravel.build/vue-test" | bash
cd vue-test
sail up -d
sail artisan vendor:publish --provider="Laravel\Sanctum\SanctumServiceProvider"\
sail composer require laravel/breeze --dev
sail artisan breeze:install 	// selected api only
sail npm i vue@next
sail npm i @vitejs/plugin-vue

I have 2 problems:

  1. vite.config.js is missing
  2. I have no dev decencies in package.json so I am getting an error when I run sail npm run dev

Here is my package.json:

{
  "dependencies": {
    "@vitejs/plugin-vue": "^4.3.4",
    "vue": "^3.2.36"
  }
}

Can anyone tell me what I am doing wrong here?

0 likes
1 reply
dcx's avatar

You're kind of making things difficult avoiding Inertia as it's a really basic install.. but that said below is a fairly recent project, I see you don't mention your dev dependencies above, below is all i have.. you're missing vite i think..

    "devDependencies": {
        "@inertiajs/vue3": "^1.0.0",
        "@tailwindcss/forms": "^0.5.3",
        "@vitejs/plugin-vue": "^4.0.0",
        "autoprefixer": "^10.4.12",
        "axios": "^1.1.2",
        "laravel-vite-plugin": "^0.7.5",
        "postcss": "^8.4.18",
        "tailwindcss": "^3.2.1",
        "vite": "^4.0.0",
        "vue": "^3.2.41"
    },

Please or to participate in this conversation.