Prisma: Running prisma version fails

Created on 2 Apr 2020  路  3Comments  路  Source: prisma/prisma

Installing Prisma and then running prisma version fails:

  prisma .env not loaded +0ms
  getos { version: 'OpenSSL 1.1.0l  10 Sep 2019\n' } +0m
  getos { ls: '' } +8ms
  getos { version: 'OpenSSL 1.1.0l  10 Sep 2019\n' } +4ms
  getos { ls: '' } +0ms
  getos { platform: 'linux', libssl: '1.1.x' } +2ms
  getos { platform: 'linux', libssl: '1.1.x' } +3ms
  engineCommands Getting version of /usr/local/lib/node_modules/@prisma/cli/introspection-engine-debian-openssl-1.1.x +0ms
Error: Error: Command failed with ENOENT: /usr/local/lib/node_modules/@prisma/cli/introspection-engine-debian-openssl-1.1.x --version
spawn /usr/local/lib/node_modules/@prisma/cli/introspection-engine-debian-openssl-1.1.x ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)

How to reproduce:

docker run -it --entrypoint bash node:10 -c "mkdir -p /app && cd /app && node -v && npm -v && npm i -g @prisma/[email protected] && \$(prisma2 version | grep ^@prisma/cli  | cut -d : -f 2 | xargs)"
bu2-confirmed kinbug

Most helpful comment

Thanks a lot for reporting 馃檹
This issue is fixed in the latest alpha version of @prisma/cli.
You can try it out with npm i -g @prisma/cli@alpha.

In case it鈥檚 not fixed for you - please let us know and we鈥檒l reopen this issue!

All 3 comments

What is happening here is that on Linux we download the binaries on the first run of the cli for the commands that need them if you install the CLI globally. Right now version is not listed as one of the commands that need the binaries but it does need them.

Workaround(Just run a command that downloads the binaries):

docker run -it --entrypoint bash node:10 -c "mkdir -p /app && cd /app && node -v && npm -v && npm i -g @prisma/[email protected] && prisma init > /dev/null 2> /dev/null && prisma2 version | grep ^@prisma/cli  | cut -d : -f 2 | xargs -I % echo %"

Yeah for me personally it's not a high priority anymore. Should be fixed nevertheless

Thanks a lot for reporting 馃檹
This issue is fixed in the latest alpha version of @prisma/cli.
You can try it out with npm i -g @prisma/cli@alpha.

In case it鈥檚 not fixed for you - please let us know and we鈥檒l reopen this issue!

Was this page helpful?
0 / 5 - 0 ratings