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

jhutto's avatar

vue.js not detected in production

I'm working on several apps with Laravel 7 and Vue.js. Now I need to move to production. I have setup a droplet at digital ocean....I wanted to test the process, so I create a simple Laravel 7 app with auth using vue. But it's not working on the droplet.

I setup laravel 7 added auth... composer require laravel/ui php artisan ui vue --auth npm install && npm run dev

register and login run fine.. Then I ran npm production (based on a few things I read)

Uploaded the app to bitbucket.

Setup digitalocean droplet with ubuntu 20.04.. installed mysql, phpmyadmin, php 7.4, apache2.. All of these were tested and work.

cloned the bitbucket repository down to /var/www/html composer update.. it ran fine... php artisan migrate - This worked and checked the database in phpmyadmin

set permissions sudo chown -R www-data.www-data /var/www/html/l7/storage sudo chown -R www-data.www-data /var/www/html/l7/bootstrap/cache

Then tried to access the app.. at IP Address. Laravel main page comes up, but when I try to register or login,... Page not found. And checked Chrome dev tools... Vue.js not detected.

Based on what I've read.. Running the npm run production, creates the js files needed. But it still not working... Also, I did run npm install on the server but that didn't work either.

What am I missing ???? I have done a ton of searches but nobody talks about installing Laravel and Vue.js on a ubuntu server......

0 likes
2 replies
EmilMoe's avatar

You do not need to "install" it on the server as it's along with your app. Did you push the .js files to git? Or do you run npm run prod on the server? (You need to do one of these).

Could be something wrong with the settings. Is it possible for you to share a link to the site?

jhutto's avatar

Yes... I ran npm run production on my local and then pushed to bitbucket. I confirmed that the app.js is in the resources folder on the server.

Here's the link.. http://159.65.75.54/

Please or to participate in this conversation.