HijenHEK / laravel-vue-sanctum-spa

A Laravel 8 and Vue 3 SPA boilerplate using tailwind styling and sanctum for authentication :ghost:
66 stars 18 forks source link

Error on production server, not on local development machine #5

Closed Aquive closed 2 years ago

Aquive commented 2 years ago

I am using this project as a boilerplate for my new project. First of all, thanks for sharing this and all the work. It saved me lots of time.

Now, I encounter a specific problem. When I deploy the project on production environment it throws an error. And the whole Vue app won't start at all. On my development envoirment it just works.

Dev environment is using nginx. Production is using apache.

Uncaught SyntaxError: Unexpected token '<'
app.js:58216 [Vue Router warn]: uncaught error during route navigation:
app.js:61432 ChunkLoadError: Loading chunk resources_js_Views_Login_vue failed.
(missing: /js/resources_js_Views_Login_vue.js)
app.js:58216 [Vue Router warn]: Unexpected error when starting the router: ChunkLoadError: Loading chunk resources_js_Views_Login_vue failed.
Aquive commented 2 years ago

Solved.

HijenHEK commented 2 years ago

Solved.

@Aquive kindly share here the details that would be helpful for future queries . Thanks for opening this issue

Aquive commented 2 years ago

The compiled JS files just were not on the production server. The public/js files were in gitignore file. :)

Thanks again for great work!

HijenHEK commented 2 years ago

@Aquive

The classic gitignore it gets the best of us in infinite ways !

You also contributed by reaching out . thank you for the explanation