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

Banky's avatar
Level 1

App does not update when VueJs components are modified and styles added after deploying to heroku

I have a laravel/vuejs app that works well on localhost. After deploying to heroku, i realized that styles added to app.scss does not compile into my public/css file, thus have no effect. Also, modifications to my vuejs components does not update the app after i push to heroku with git push heroku master. I have added heroku/nodejs buildpack on my heroku dashboard. Here is my webpack.mix.js file content;

0 likes
6 replies
bugsysha's avatar

Wasn't it easier to compile JS and CSS on local and push it with the rest of the code? Envoyer can handle building assets, but not sure for Heroku...

Banky's avatar
Level 1

The issue started after deployment.Compilation was successful locally but subsequent ones after the first deployment wouldn't update the app, no error messages.

pazitron's avatar

Are you compiling your assets on the live server each time you deploy your changes? Try running npm run production or yarn build production on the live server.

Compiling assets on the local env and pushing them to the live one might not be suitable for some situations, especially if you're referencing evn values in your js files.

Banky's avatar
Level 1

Thanks Pazitron.Running npm run production on live server returns error "cross-env is not recognised as an internal or external command, operable program or batch file"

pazitron's avatar

Try

npm install --global cross-env

npm install

npm run production

1 like
bugsysha's avatar

I'm not for global packages on live servers. You probably are caching JS files and that is why you are not seeing any updates. SCP that JS file to your local computer and compare it to what you have in repo and they should be the same.

Please or to participate in this conversation.