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

Prisma init fails on Node v23 #1044

Open
AmaseCocoa opened this issue Nov 14, 2024 · 0 comments
Open

Prisma init fails on Node v23 #1044

AmaseCocoa opened this issue Nov 14, 2024 · 0 comments

Comments

@AmaseCocoa
Copy link

AmaseCocoa commented Nov 14, 2024

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): prisma/prisma#25463
Comments on developer issues: prisma/prisma#25560 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant