Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

nanadjei2's avatar

Module not found

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'
0 likes
5 replies
ftiersch's avatar

Obvious questions first:

  1. Is there a resources/js/components/layouts/AuthLayout.vue file in your Laravel project?
  2. Is that file commited to git?
Sinnbeck's avatar

Can you post a quick overview of your resources structure on your production server? Perhaps a screenshot?

ftiersch's avatar

Also important (if you are working on Windows): Windows doesn't care about case sensitivity. So it would work with Authlayout.vue. Linux does care, though, so that won't work!

1 like
nanadjei2's avatar
nanadjei2
OP
Best Answer
Level 4

@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.