0

i have a laravel 5 & vuejs application on my local server (vue js that comes with laravel). And now i want to deploy this application on real server like "000webhost.com" to test. Laravel works fine, but Vue doesn't, I get some unexpected behaviors like blank page when assigning the id="app" to the parent element, and when i remove the id="app" the page appears and works correctly but Vue doesn't.

This is my project structure: project structure

When uploading,, I upload the whole project without "node_modules" directory (that comes with npm install) Could this be the reason ?

1 Answer 1

2

You need to run npm run dev or npm run prod to create your resource bundle with the javascript and other assets. You technically don't need node_modules, so long as you build the projects on another machine and upload all that to your hosted server.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks for your reply,, do you mean run "npm run prod" on my local project then upload it ??
Yep, run npm run prod on your local project and then upload to your server.
I am getting trouble during deployment laravel+vue. Would you help me please.... - stackoverflow.com/questions/57991720/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.