user9211310
user9211310

Reputation:

Deploy laravel app to shared host with npm dependencies

I am about to finally deploy my laravel app to shared host soon, using ssh. My question here is: in local enviroment I installed all npm dependencies (npm install), to compile all vue.js scripts.

What i already know is that: after uploading everything to shared host I should run "composer install" to install composer dependencies and edit .env.

But should I also run "npm install" if I already have my app.js compiled on local enviroment?

Thanks, PS

Upvotes: 1

Views: 1994

Answers (2)

NIKUNJ KOTHIYA
NIKUNJ KOTHIYA

Reputation: 2165

Yes as per my experience with Hostinger it is not possible to install NODE, and NPM via a command on the server. Because it is not a private server and it is already given us our requirements setup during server selection. So you can do this by pushing your js assets with git and pulling on the server to get js.

Upvotes: 0

Dan
Dan

Reputation: 987

You actually probably don't have npm on a shared server. At least with HostGator, which is where I have experience, it wasn't possible - in which case - you would need to run and compile npm locally before pushing to the server.

Upvotes: 2

Related Questions