intermittent: Cannot find module for page
See original GitHub issueBug report
Describe the bug
While running in dev mode (npm run dev), I get ‘{ Error: Cannot find module for page: /lessons/[album]/[slug]’. This happens occasionaly and I can’t reproduce it on demand.
Once it happens, the Error page will be displayed and then after a few seconds the page will be re-displayed without the error – rendered as it should be.
My page set up:
pages ->
lessons ->
[album] ->
[slug].tsx
The page [slug].tsx indeeds exports all the necessary paths via getStaticPaths
(e.g. [ .. {"params":{"album":"mlu","slug":"association-rules"}} .. ]
)
To Reproduce
I am unable to find a reliable way to demonstrate this on demand.
Expected behavior
Screenshots
If applicable, add screenshots to help explain your problem.
System information
- OS: mac/10.15.6
- Version of Next.js: 9.5 (although I noticed this happening since 9.3)
- Version of Node.js: 10.16.3
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Nextjs export gives Cannot find module for page
I wanted to export the site with some dynamic routes. My pages folder structure is like below page locales [locale] [slug].js. When I...
Read more >module-not-found - Next.js
A module not found error can occur for many different reasons: The module you're trying to import is not installed in your dependencies;...
Read more >cannot find module [Node npm Error Solved] - freeCodeCamp
How to Fix the "cannot find module" Error · delete the node modules folder by running rm -rf node_modules · delete package.lock.json file...
Read more >99 grand marquis pats module location. 99 +$45. Sales ...
If you still have any questions or concerns you can call our Ford Parts Specialists at 844-987-FORD and we'll help you find the...
Read more >Suddenlink router init failed - La Bina Travel Designer
By continuing to use this site you consent to the use of cookies ... We can use this as follows:Cannot find module 'autoprefixer'...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For me, I had the
yarn dev
(next
) command running in another terminal. Once I killed that process and ranyarn build && yarn export
, the issue went away.I ran into this error today using
next build
:I ran
next build
again and it completed without issue.