Skip to content
This repository was archived by the owner on Apr 15, 2025. It is now read-only.
This repository was archived by the owner on Apr 15, 2025. It is now read-only.

Prisma generate is looking for npm #1058

@DrissiReda

Description

@DrissiReda

Bug description

I'm trying to package a small Dockerfile and so I don't have node or npm installed, the expectation being that this is supposed to use rust engine prisma instead of node/ts.

How to reproduce

Use my schema.prisma and run prisma generate

You'll get this output

Installing Prisma CLI
An error ocurred while installing the Prisma CLI; npm install log: env: can't execute 'node': No such file or directory

Traceback (most recent call last):
  File "/usr/bin/prisma", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.12/site-packages/prisma/cli/cli.py", line 37, in main
    sys.exit(prisma.run(args[1:]))
             ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/prisma/cli/prisma.py", line 35, in run
    entrypoint = ensure_cached().entrypoint
                 ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/prisma/cli/prisma.py", line 99, in ensure_cached
    proc.check_returncode()
  File "/usr/lib/python3.12/subprocess.py", line 502, in check_returncode
    raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command '['/root/.cache/prisma-python/nodeenv/bin/npm', 'install', '[email protected]']' returned non-zero exit status 127.

Is it trying to install the engine? Why the node and not the rust one as outlined in documentation?

Expected behavior

Not to require node/npm binaries.

Prisma information

// prisma/schema.prisma

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

generator client {
  provider        = "prisma-client-py"
  recursive_type_depth = 5 
}

model CookieConsent {
  id        Int      @id @default(autoincrement())
  accepted  Boolean
  timestamp DateTime @default(now())
}

Environment & setup

  • OS: Debian 12
  • Database: PostgreSQL
  • Python version: 3.12.8
  • Prisma version:
prisma                  : 5.17.0
prisma client python    : 0.15.0
platform                : linux-musl
expected engine version : 393aa359c9ad4a4bb28630fb5613f9c281cde053
installed extras        : []
install path            : /usr/lib/python3.12/site-packages/prisma
binary cache dir        : /root/.cache/prisma-python/binaries/5.17.0/393aa359c9a

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions