Missing module in `next/server/pages/api`
See original GitHub issueUsing a brand new project bootstrapped with yarn create keystone app
trying to run using yarn dev
On boot of app, after the App UI is ready, this comes in:
Error: Cannot find module '/Users/liamdoyle/Developer/theshoregroup/keystonecms/.keystone/admin/.next/server/pages/api/__keystone_api_build'
Require stack:
- /Users/liamdoyle/Developer/theshoregroup/keystonecms/node_modules/@keystone-6/core/scripts/dist/keystone-6-core-scripts.cjs.dev.js
- /Users/liamdoyle/Developer/theshoregroup/keystonecms/node_modules/@keystone-6/core/scripts/dist/keystone-6-core-scripts.cjs.js
- /Users/liamdoyle/Developer/theshoregroup/keystonecms/node_modules/@keystone-6/core/bin/cli.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.mod._resolveFilename (/Users/liamdoyle/Developer/theshoregroup/keystonecms/node_modules/next/build/webpack/require-hook.ts:141:26)
at Function.resolve (node:internal/modules/cjs/helpers:108:19)
at initKeystone (/Users/liamdoyle/Developer/theshoregroup/keystonecms/node_modules/@keystone-6/core/scripts/dist/keystone-6-core-scripts.cjs.dev.js:223:36)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/liamdoyle/Developer/theshoregroup/keystonecms/node_modules/@keystone-6/core/scripts/dist/keystone-6-core-scripts.cjs.dev.js',
'/Users/liamdoyle/Developer/theshoregroup/keystonecms/node_modules/@keystone-6/core/scripts/dist/keystone-6-core-scripts.cjs.js',
'/Users/liamdoyle/Developer/theshoregroup/keystonecms/node_modules/@keystone-6/core/bin/cli.js'
]
}
Isn’t related to my dependancies - went down and up a 0.0.x version with no change. Also happened on the Azure Example
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
module-not-found - Next.js
The module you're trying to import is in a different directory; The module you're trying to import has a different casing; The module...
Read more >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 >Next.js: The Good, Bad and Ugly - An Idiosyncratic Blog
This method is used when we want to pre-render a page on each request using the data returned by getServerSideProps . Unlike getStaticProps...
Read more >next-i18next - npm
To do that, you can pass an array of required namespaces for each page into serverSideTranslations . You can see this approach in...
Read more >Top 5 next-server Code Examples - Snyk
entryModule !== module) { return moduleSourcePostModule } // Check if the chunk is a page if (!IS_BUNDLED_PAGE_REGEX.test(chunk.
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
I guess I will create a new issue as this one is closed
I got that error when I was using v16.13.0. It works with another node versions like v16.16.0.