Jamesyoyoyo
Jamesyoyoyo

Reputation: 1

Issue Deploying Nuxt Frontend with Laravel Vapor

I am deploying my current Laravel project with Laravel Vapor to a staging environment. The frontend is almost entirely using Nuxt. The Nuxt relevant code is contained within a nuxt-ui directory within the larger Laravel project.

Project Directory

When deploying it, the backend seems to deploy everything correctly, but the site displays nothing as if there is no frontend, so I think there must be an issue with Nuxt deploying correctly.

So far on my local environment, I'd just cd nuxt-ui and run npm run dev. I noticed that there wasn't a npm command in the vapor deployment instructions. So I edited the vapor.yml to add the line: - 'cd nuxt-ui && npm ci && npm run build'

vapor.yml

I could only add it to the build instructions because deploy only takes artisan commands. I'm not sure if this is actually the issue and the my code isn't correct for it to work or if the issue is something else entirely. Is it not possible to deploy a Nuxt frontend through Laravel Vapor?

Upvotes: 0

Views: 28

Answers (0)

Related Questions