Open DrBoria opened 8 months ago
I also hit this error when I tried to move from Next 13 to Next 14 inside turborepo.
Identical situation with upgrade from Next 13 to Next 14 in NX monorepo...
There is potenitally multiple versions of NextJs in your dependency tree. You could try using overrides
to force a particular version of NextJS - I am using Turbo with NextJS 14 without issues but using overrides
https://github.com/borisno2/on-the-hill-drama-club/blob/main/package.json#L94
Good call @borisno2! I thought I had already ruled this out but tried again and was able to build without error.
Previously used turborepo - didn't works even with overrides
.
As a result - solution is to set in the repository the same version of next as in keystone-6
So for 6.1.0 - "next": "13.3.0"
Works for me.
Same situation with Prisma: Error: Cannot find module '.prisma/client/default'
Just install prisma: 15.3.0
`// create turborepo npx create-turbo@latest my-monorepo cd my-monorepo
// add keystone to turborepo cd apps npm init keystone-app my-keystone-app
cd my-keystone-app npm run build`
As I expect it should build production-ready static pages. But I'm receiving error
NEXT_EXPORT_ERROR
If I move keystone outside of turborepo and install dependencies once again - it works fine. But inside - it fails.
Environment:
"@keystone-6/auth": "^7.0.2", "@keystone-6/core": "^5.7.2", "@keystone-6/fields-document": "^8.0.2", Node version 18.18.0
windows 11, macos, and vercel build - same errors.