Skip to content

Output path of current Prisma in -v  #7771

Closed

Description

@janpio

Problem

This is a situation that can happen:

--- yarn prisma -v ---
warning package.json: No license field
prisma               : 2.26.0-dev.7
@prisma/client       : 2.26.0-dev.7
Current platform     : debian-openssl-1.1.x
Query Engine         : query-engine c838e79f39885bc8e1611849b1eb28b5bb5bc922 (at node_modules/@prisma/engines/query-engine-debian-openssl-1.1.x)
Migration Engine     : migration-engine-cli c838e79f39885bc8e1611849b1eb28b5bb5bc922 (at node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine : introspection-core c838e79f39885bc8e1611849b1eb28b5bb5bc922 (at node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary        : prisma-fmt c838e79f39885bc8e1611849b1eb28b5bb5bc922 (at node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Default Engines Hash : c838e79f39885bc8e1611849b1eb28b5bb5bc922
Studio               : 0.402.0
--- ls node_modules/@prisma/engines/ ---
ls: cannot access 'node_modules/@prisma/engines/': No such file or directory

As you can see yarn prisma -v tells us the engines comes from node_modules/@prisma/engines, but when you try to list that directory, it is actually not present.

What is happening here is that yarn prisma is actually from a few folders above our project. This is kinda visible when you look to not run yarn -s but just yarn:

codespace ➜ /workspaces/e2e-tests/platforms-serverless/firebase-functions (janpio-patch-5 ✗) $ yarn prisma -v
yarn run v1.22.10
warning package.json: No license field
$ /workspaces/e2e-tests/node_modules/.bin/prisma -v
prisma               : 2.25.0-dev.36
@prisma/client       : 2.25.0-dev.36
...

Suggested solution

Output the directory of where the executed prisma is from, either similar to Yarn the absolute path to the binary in node_modules, or the folder where the package.json that is responsible for the installation of Prisma comes from.

Alternatives

Rely on yarn itself to give that information. Will not work with npx unfortunately for example.

Activity

  1. added
    topic: prisma version
    on Dec 6, 2022
  2. kartikbhardwaj1111 commented on Nov 19, 2025

    @kartikbhardwaj1111
  3. quantbitrealmSimon commented on Feb 28, 2026

    @quantbitrealmSimon
  4. quantbitrealmSimon commented on Feb 28, 2026

    @quantbitrealmSimon
  5. added a commit that references this issue on Feb 28, 2026
    c5dd13d
  6. quantbitrealmSimon commented on Feb 28, 2026

    @quantbitrealmSimon

    I've submitted a fix for this issue in PR #29275.

    The change adds a 'Prisma CLI Path' row to the version output, showing where the Prisma CLI is installed. This will help users debug cases where multiple installations exist (e.g., global vs local).

    Example output:

    prisma               : 7.5.0
    @prisma/client       : 7.5.0
    ...
    Studio               : 0.0.0
    Prisma CLI Path      : /path/to/node_modules/@prisma/cli
    
  7. added a commit that references this issue on Mar 5, 2026
    2cfa589
  8. deleted a comment from devnull37 on May 18, 2026
  9. deleted a comment from adxptived on May 18, 2026
  10. 5 remaining items

  11. deleted a comment from vishalbalani on May 18, 2026
  12. deleted a comment from algora-pbc on May 18, 2026
  13. deleted a comment from MAYANK-TRIPATH on May 18, 2026
  14. deleted a comment from mnmt7 on May 18, 2026
  15. deleted a comment from algora-pbc on May 18, 2026
  16. baronguyen001 commented on May 24, 2026

    @baronguyen001

    Opened PR #29585 for this issue.

  17. jamilahmadzai commented on May 26, 2026

    @jamilahmadzai
  18. nagyminyo-cmyk commented on May 28, 2026

    @nagyminyo-cmyk
  19. added a commit that references this issue on May 28, 2026
    9e63a7f
  20. kitwongpixel commented on May 30, 2026

    @kitwongpixel
  21. kitwongpixel commented on May 30, 2026

    @kitwongpixel
  22. added a commit that references this issue on Jul 19, 2026
    bd24403
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featuretopic: clitopic: prisma version

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions