keystonejs / keystone

The most powerful headless CMS for Node.js — built with GraphQL and React
https://keystonejs.com
MIT License
8.98k stars 1.13k forks source link

Keystone Prisma CLI does not work with Node v22.1.0 #9146

Open yorkeJohn opened 1 month ago

yorkeJohn commented 1 month ago

Keystone Prisma CLI commands do not work with the latest Node version. Downgrading to Node 20 LTS fixed this issue.

The following error occurs when running keystone build (in the postinstall):

> npm install

> cms@1.0.3 postinstall
> keystone build --no-ui --frozen

(node:18708) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)        
✨ GraphQL and Prisma schemas are up to date
AggregateError: 
    GeneratorError: Generator "C://<redacted>//cms//node_modules//@prisma//client//generator-build//index.js" failed:
    Assertion failed: process_title, file c:/ws/deps/uv/src/win/util.c, line 418  
        at ChildProcess.<anonymous> (C:/<redacted>/cms/node_modules/@prisma/generator-helper/dist/chunk-XP4JGOVU.js:620:25)       
        at ChildProcess.emit (node:events:520:28)
        at ChildProcess.emit (node:domain:488:12)
        at ChildProcess._handle.onexit (node:internal/child_process:294:12)       
    at next (C:\<redacted>\cms\node_modules\@prisma\internals\dist\chunk-WTCY7DFZ.js:3159:24)
    at C:\<redacted>\cms\node_modules\@prisma\internals\dist\chunk-WTCY7DFZ.js:3180:17
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 

And the following when running prisma commands such as keystone prisma migrate dev and keystone prisma generate:

> npm run migrate-dev                                                                                                                                                                   

> cms@1.0.3 migrate-dev
> keystone prisma migrate dev

(node:8912) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
✨ GraphQL and Prisma schemas are up to date
Assertion failed: process_title, file c:\ws\deps\uv\src\win\util.c, line 418

Node version:

> node -v                                                                                                                                                                               
v22.1.0
dcousens commented 1 month ago

@yorkeJohn can you provide any additional details about your environment?

yorkeJohn commented 1 month ago

Windows 11, NPM 10.7.0