keystone icon indicating copy to clipboard operation
keystone copied to clipboard

Keystone Prisma CLI does not work with Node v22.1.0

Open yorkeJohn opened this issue 1 year ago • 7 comments

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

> [email protected] 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                                                                                                                                                                   

> [email protected] 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

yorkeJohn avatar May 14 '24 17:05 yorkeJohn

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

dcousens avatar May 16 '24 00:05 dcousens

Windows 11, NPM 10.7.0

yorkeJohn avatar May 16 '24 02:05 yorkeJohn

also running all keystone related stuff on 18.19.1 actually.

mandymozart avatar Jul 12 '24 20:07 mandymozart

[Edited] I am also facing the same issue on windows 10. The workaround I used to downgrade Node to v18. It also works with latest v20.18.0.

krzysztof-fijolek avatar Nov 02 '24 13:11 krzysztof-fijolek

Just dropping in and confirming I also had issues when I didn't realise I'd left my Node up at V22.13.1 from another project :)

When trying to run migrate dev I got:

Assertion failed: process_title, file c:\ws\deps\uv\src\win\util.c, line 412

Quick switch back to 20.14.0 and it worked a charm

TheRealFlyingCoder avatar Feb 04 '25 04:02 TheRealFlyingCoder

I'm seeing a trend of Windows paths in the reports 👀

dcousens avatar Feb 04 '25 05:02 dcousens

I'm seeing a trend of Windows paths in the reports 👀

Any thoughts on why it might be failing for windows @dcousens?

TheRealFlyingCoder avatar Feb 19 '25 00:02 TheRealFlyingCoder