nuxt: Randomly Getting: Cannot find module 'pages/index.js'
Version
Reproduction link
https://codesandbox.io/ (Sorry, unable to reproduce it, maybe someone else can)
Steps to reproduce
Unknown but I am not the only one having this issue: https://github.com/nuxt/nuxt.js/issues/5006#issuecomment-468197574
What is expected ?
Server should start normally.
What is actually happening?
I get this error: ‘Cannot find module ‘pages/index.js’ from ‘/Users/nahtnam/Desktop/programs.nosync/nahtnam/nahtnam’’
Additional comments?
The only weird customization I have done is move everything into an src folder. Restarting the server over and over again eventually fixes this issue
Not really sure how to extrac the stack trace but here is a screenshot of the error.
.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 13
- Comments: 36 (3 by maintainers)
I’m having the same issue. Ubuntu 18.04 / v2.4.5 It happens after
npm run dev, when I navigate tohttp://localhost:3000/Workaround is to make a small change in
pages/index.vueto trigger regeneration.@anteriovieira @damienrave After updating Nuxt to 2.5.1 this issue seems to be vanished.
Marking this as solved so far. Thanks for pinging back!