Obvious questions first:
- Is there a resources/js/components/layouts/AuthLayout.vue file in your Laravel project?
- Is that file commited to git?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am trying to push my Vue.js Single Page Application into production using Forge. In my deploy script I have npm run prod, anytime it starts building my vue component it get this error.
ERROR in ./resources/js/routes.js
Module not found: Error: Can't resolve './components/layouts/AuthLayout.vue' in
'/home/forge/project.domain.dev/resources/js'
@ftiersch that was the exact issue. So I had to move the path.
git mv path/to/component/AuthLayout.Vue path/to/component/AuthLayout.vue
Please or to participate in this conversation.