prisma-client-py icon indicating copy to clipboard operation
prisma-client-py copied to clipboard

Prisma init fails on Node v23

Open AmaseCocoa opened this issue 1 year ago • 0 comments

Bug description

Prisma Client Python installs Node.js v23 series, prisma init does not work properly

To resolve this, specify --node=lts in the nodeenv command on line 170 of prisma/cli/_node.py (to specify that v22 should be installed) and it will work correctly.

(Fix Example)

                subprocess.run(
                    [
                        sys.executable,
                        '-m',
                        'nodeenv',
                        str(cache_dir),
                        *config.nodeenv_extra_args,
+                        "--node=lts"
                    ],
                    check=True,
                    stdout=sys.stdout,
                    stderr=sys.stderr
                )

How to reproduce

  1. Install prisma-client-python in a fresh environment and run prisma init

Expected behavior

Successful completion of init.

Prisma information


Environment & setup

- OS: Windows
- Database: (This is a CLI issue)
- Python version: 3.12.7
- Prisma version: 0.15.0

Related bugs (Prisma): https://github.com/prisma/prisma/issues/25463 Comments on developer issues: https://github.com/prisma/prisma/issues/25560#issuecomment-2462151407

AmaseCocoa avatar Nov 14 '24 08:11 AmaseCocoa