Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node 20 (LTS) support #8987

Closed
Josef-Reichardt opened this issue Jan 13, 2024 · 7 comments
Closed

Node 20 (LTS) support #8987

Josef-Reichardt opened this issue Jan 13, 2024 · 7 comments
Labels
🐛 bug Unresolved bug dependencies Related to our dependencies

Comments

@Josef-Reichardt
Copy link

Project setup fails on node 20 (current LTS - with yarn and npm) because of a dependency which is not compatible to node 20:

@keystone-6/core > @prisma/migrate > mssql > tedious > @azure/identity > @azure/[email protected]

error @azure/[email protected]: The engine "node" is incompatible with this module. Expected version "10 || 12 || 14 || 16 || 18". Got "20.4.0"

I've created the app via yarn create keystone-app and the setup proceeds with npm automatically because it fails with yarn:

grafik

But after that, when I remove package-lock.json and node_module because I want to work with yarn instead of npm and run yarn install it reports the following error:

grafik

npm install only displays a warning for that:

grafik

Tested on node v20.4.0 and v20.11.0.

@dcousens
Copy link
Member

dcousens commented Jan 14, 2024

Probably an option for you is to resolve that dependency - if you aren't using it - to nothing.
That said, officially, we are constrained by Prisma's support for now.

@Josef-Reichardt
Copy link
Author

Yes, this works. Thanks for the workaround but it's not a very good first use experience. The reason is that @keystone-6/core uses @prisma/migrate version 4.16.2 (the latest version is 5.8.1 at the moment).

Are there plans to update this dependency?


I have solved it by the mentioned workaround for now in my package.json:

{
  ...
  "dependencies": {
    "@keystone-6/auth": "^7.0.0",
    "@keystone-6/core": "^5.0.0",
    "@keystone-6/fields-document": "^7.0.0",
    "typescript": "^4.9.5"
  },
  "resolutionsComments": {
    "@prisma/migrate": "Required until https://github.com/keystonejs/keystone/issues/8987 is resolved!"
  },
  "resolutions": {
    "@prisma/migrate": "5.8.1"
  }
}

This displays a warning but it seems to work.

warning Resolution field "@prisma/[email protected]" is incompatible with requested version "@prisma/[email protected]"

@dcousens dcousens added dependencies Related to our dependencies 🐛 bug Unresolved bug labels Jan 19, 2024
@fkrauthan
Copy link
Contributor

Any updates on this?

@dcousens dcousens pinned this issue Feb 27, 2024
@iamandrewluca
Copy link
Contributor

iamandrewluca commented Mar 7, 2024

A workaround we did is to stub that package completely with an empty package as we use postgresql only

packages/mssql/package.json (create this file with content below, adjust version)

{
	"name": "mssql",
	"version": "9.1.1"
}

Then install it explicitly

npm install mssql@file:packages/mssql

@Forux
Copy link

Forux commented Mar 18, 2024

Problem is still there and yes it is strange first time experience

@Jeanclaudeaoun
Copy link

Got it to work like this instead @Josef-Reichardt
or maybe this only fixed the issue in my case since i am using yarn workspaces

{
  "name": "keystone-app",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "keystone dev",
    "start": "keystone start",
    "build": "keystone build",
    "postinstall": "keystone build --no-ui --frozen"
  },
  "dependencies": {
    "@keystone-6/auth": "^7.0.0",
    "@keystone-6/core": "^5.0.0",
    "@keystone-6/fields-document": "^7.0.0",
    "typescript": "^4.9.5"
  },
  "resolutions": {
    "**/@azure/msal-node": "2.7.0"
  }
}

@dcousens
Copy link
Member

@Jeanclaudeaoun we have updated prisma in the newest major of @keystone-6/core: ^6.0.0 - can you update to that instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Unresolved bug dependencies Related to our dependencies
Projects
None yet
Development

No branches or pull requests

6 participants