ericknyoto's avatar

How to run Laravel apps in a Non supported NodeJS hosting site

I've deployed my Laravel apps to the Hosting site. And, I noticed that they don'ts support NodeJS, so that means I can not run npm run prod.

My questions is: Can I run npm run prod on my local environment, then deploy the generated / compiled assets to the hosting server? Does it will work if I dont run npm run prod from the server itself?

Or is there any solution to this? Change hosting site is not an option for me :)

0 likes
3 replies
martinbean's avatar
Level 80

@ericknyoto All npm run prod does is generate files so yes, you could run it locally and then upload the resulting files to your server. But obviously that’s going to be a pain in the ass to keep doing for every change/deployment.

2 likes
jlrdw's avatar

Also, compiling assets are recommended, but is completely optional.

2 likes

Please or to participate in this conversation.