-
-
Notifications
You must be signed in to change notification settings - Fork 11
Broken compatibility with new keystone next.config.js template #333
Comments
Simply replacing next.config.js is a fix : In project root/admin/next.config.js : const nextConfig = {
typescript: {
ignoreBuildErrors: true,
},
eslint: {
ignoreDuringBuilds: true,
},
experimental: {
appDir: false,
},
// We use transpilePackages for the custom admin-ui pages in the ./admin folder
// as they import ts files into nextjs
transpilePackages: ['../../admin'],
basePath: '/admin'
}
module.exports = nextConfig In keystone.ts : ui : {
getAdditionalFiles: [
async () => [
{
mode: 'copy',
inputPath: Path.resolve('./admin/next.config.js'),
outputPath: 'next.config.js',
}
]
]
} But then I have what I think is a next version error :
I'm investigating to make the versions match |
Updating next to "next": "13.3.0", used by latest Keystone version fixed this error. |
Hey @Francoois thanks for logging this issue. You are correct, a recent change in Keystone has broken how this package adds a custom path to Keystone - something which has now also been added to Keystone see - keystonejs/keystone#8545 The way this package handles the next-auth session is also broken with later versions of next-auth ( With the, somewhat unknown, future impacts of the upcoming With this in mind, I created a PR over on the keystone repo that adds an example of using I am still open to reviewing a PR if you think there is value in the package supporting the latest version of keystone, but not the latest of next-auth. |
Thank you @borisno2 for your feedbacks, I understand better. It is probably a good idea to interact directly with next-auth. |
No worries @Francoois yes, it all will work with |
In @keystone-6/core 5.3.2 "./___internal-do-not-use-will-break-in-patch/admin-ui/next-config" was removed and replaced by content generated from packages/core/src/admin-ui/templates/next-config.ts.
In @opensaas/keystone-nextjs-auth/src/templates/next-config.ts is :
const keystoneConfig = require('@keystone-6/core/___internal-do-not-use-will-break-in-patch/admin-ui/next-config').config;
It takes precedence over keystone.ts config and produce following error :
Should we import the template from Keystone ?
The text was updated successfully, but these errors were encountered: