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

Query engine library for current platform "linux-musl" could not be found #16642

Closed
nimbit-software opened this issue Dec 6, 2022 · 11 comments
Closed
Labels
bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. kind/bug A reported bug. team/client Issue for team Client. topic: deployment-platform topic: linux-musl

Comments

@nimbit-software
Copy link

nimbit-software commented Dec 6, 2022


/usr/src/app/main.js:27562
2022-12-06 01:29:15       throw new PrismaClientInitializationError(errorText, this.config.clientVersion);
2022-12-06 01:29:15             ^
2022-12-06 01:29:15 
2022-12-06 01:29:15 PrismaClientInitializationError: Query engine library for current platform "linux-musl" could not be found.
2022-12-06 01:29:15 You incorrectly pinned it to linux-musl
2022-12-06 01:29:15 
2022-12-06 01:29:15 This probably happens, because you built Prisma Client on a different platform.
2022-12-06 01:29:15 (Prisma Client looked in "/usr/src/app/libquery_engine-linux-musl.so.node")
2022-12-06 01:29:15 
2022-12-06 01:29:15 Searched Locations:
2022-12-06 01:29:15 
2022-12-06 01:29:15   /.prisma/client
2022-12-06 01:29:15   C:\Users\sooter\Documents\IOT\nimbit-service-mono\customer-apps\doppstadt\proemion-data-manager\node_modules\@prisma\doppstadt\proemion-data-manager
2022-12-06 01:29:15   /usr/src
2022-12-06 01:29:15   /usr/src/app
2022-12-06 01:29:15   /usr/src/app
2022-12-06 01:29:15   /tmp/prisma-engines
2022-12-06 01:29:15   /usr/src/app
2022-12-06 01:29:15 
2022-12-06 01:29:15 You already added the platforms "windows", "linux-musl" to the "generator" block
2022-12-06 01:29:15 in the "schema.prisma" file as described in https://pris.ly/d/client-generator,
2022-12-06 01:29:15 but something went wrong. That's suboptimal.
2022-12-06 01:29:15 
2022-12-06 01:29:15 Please create an issue at https://github.com/prisma/prisma/issues/new
2022-12-06 01:29:15     at DefaultLibraryLoader.getLibQueryEnginePath (/usr/src/app/main.js:27562:13)
2022-12-06 01:29:15     at async DefaultLibraryLoader.loadLibrary (/usr/src/app/main.js:27480:33)
2022-12-06 01:29:15     at async LibraryEngine.loadEngine (/usr/src/app/main.js:27799:24)
2022-12-06 01:29:15     at async LibraryEngine.instantiateLibrary (/usr/src/app/main.js:27753:5) {
2022-12-06 01:29:15   clientVersion: '4.7.1',
2022-12-06 01:29:15   errorCode: undefined
2022-12-06 01:29:15 }
@eviefp eviefp added kind/bug A reported bug. topic: deployment-platform team/client Issue for team Client. team/schema Issue for team Schema. and removed team/client Issue for team Client. labels Dec 6, 2022
@janpio janpio added team/client Issue for team Client. topic: linux-musl and removed team/schema Issue for team Schema. labels Dec 8, 2022
@claudiowilson
Copy link

claudiowilson commented Dec 13, 2022

happens to me as well using node:16-alpine

~ $ npx prisma -v
Environment variables loaded from .env
prisma                  : 4.6.1
@prisma/client          : 4.6.1
Current platform        : linux-musl
Query Engine (Node-API) : libquery-engine 694eea289a8462c80264df36757e4fdc129b1b32 (at node_modules/@prisma/engines/libquery_engine-linux-musl.so.node)
Migration Engine        : migration-engine-cli 694eea289a8462c80264df36757e4fdc129b1b32 (at node_modules/@prisma/engines/migration-engine-linux-musl)
Introspection Engine    : introspection-core 694eea289a8462c80264df36757e4fdc129b1b32 (at node_modules/@prisma/engines/introspection-engine-linux-musl)
Format Binary           : prisma-fmt 694eea289a8462c80264df36757e4fdc129b1b32 (at node_modules/@prisma/engines/prisma-fmt-linux-musl)
Format Wasm             : @prisma/prisma-fmt-wasm 4.6.1-3.694eea289a8462c80264df36757e4fdc129b1b32
Default Engines Hash    : 694eea289a8462c80264df36757e4fdc129b1b32
Studio                  : 0.476.0

@jirayui
Copy link

jirayui commented Dec 13, 2022

happens to me as well using node:16-alpine

~ $ npx prisma -v
Environment variables loaded from .env
prisma                  : 4.6.1
@prisma/client          : 4.6.1
Current platform        : linux-musl
Query Engine (Node-API) : libquery-engine 694eea289a8462c80264df36757e4fdc129b1b32 (at node_modules/@prisma/engines/libquery_engine-linux-musl.so.node)
Migration Engine        : migration-engine-cli 694eea289a8462c80264df36757e4fdc129b1b32 (at node_modules/@prisma/engines/migration-engine-linux-musl)
Introspection Engine    : introspection-core 694eea289a8462c80264df36757e4fdc129b1b32 (at node_modules/@prisma/engines/introspection-engine-linux-musl)
Format Binary           : prisma-fmt 694eea289a8462c80264df36757e4fdc129b1b32 (at node_modules/@prisma/engines/prisma-fmt-linux-musl)
Format Wasm             : @prisma/prisma-fmt-wasm 4.6.1-3.694eea289a8462c80264df36757e4fdc129b1b32
Default Engines Hash    : 694eea289a8462c80264df36757e4fdc129b1b32
Studio                  : 0.476.0

try to change from node:16-alpine to node:16-alpine3.16, it works for me

@jirayui
Copy link

jirayui commented Dec 13, 2022

relates to this issue

#16553

@claudiowilson
Copy link

happens to me as well using node:16-alpine

~ $ npx prisma -v
Environment variables loaded from .env
prisma                  : 4.6.1
@prisma/client          : 4.6.1
Current platform        : linux-musl
Query Engine (Node-API) : libquery-engine 694eea289a8462c80264df36757e4fdc129b1b32 (at node_modules/@prisma/engines/libquery_engine-linux-musl.so.node)
Migration Engine        : migration-engine-cli 694eea289a8462c80264df36757e4fdc129b1b32 (at node_modules/@prisma/engines/migration-engine-linux-musl)
Introspection Engine    : introspection-core 694eea289a8462c80264df36757e4fdc129b1b32 (at node_modules/@prisma/engines/introspection-engine-linux-musl)
Format Binary           : prisma-fmt 694eea289a8462c80264df36757e4fdc129b1b32 (at node_modules/@prisma/engines/prisma-fmt-linux-musl)
Format Wasm             : @prisma/prisma-fmt-wasm 4.6.1-3.694eea289a8462c80264df36757e4fdc129b1b32
Default Engines Hash    : 694eea289a8462c80264df36757e4fdc129b1b32
Studio                  : 0.476.0

try to change from node:16-alpine to node:16-alpine3.16, it works for me

@jirayui can you post your full dockerfile? mine still isn't working

@jkomyno
Copy link
Contributor

jkomyno commented Dec 14, 2022

Hey @nimbit-software, could you please tell us more about the problem you're experiencing?
It looks to us you're generating the client on Windows and using it on Linux Alpine, but we would need more info to be able to help.
E.g., could you paste your schema, describe which OS and architecture you're in, and the steps you were performing with Prisma? Thanks

@jkomyno
Copy link
Contributor

jkomyno commented Dec 15, 2022

Hey @claudiowilson, could you please elaborate what issue you're experiencing? Your prisma -v command reveals libquery_engine-linux-musl.so.node is correctly download, so linux-musl is found.
Can you please paste any error (and stacktrace) you're facing, describe which OS and architecture you're in, paste your schema, and tell us which step you were taking? Thanks

@claudiowilson
Copy link

claudiowilson commented Dec 15, 2022

@jkomyno figured it out -- the image i was using build the prism client was different than the image i was using to run. that output was from when I had run prisma generate again but had not yet restarted the application. everything works now!

@janpio janpio added the bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. label Dec 15, 2022
@jclaessens97
Copy link

I have the same issue in #16901 but as far as I can see I install, build and generate on the same platform (being node18-alpine3.16).

I tried both building from my m1 mac as from Github Actions.

@azaek
Copy link

azaek commented Jan 17, 2023

add prisma generate command before your run in Dockerfile. It worked for me

...
RUN npx prisma generate
RUN npm run build

EXPOSE 4000
CMD [ "npm", "start" ]

@aqrln
Copy link
Member

aqrln commented Apr 11, 2023

The original report looks like it might be #15325, given these lines:

2022-12-06 01:29:15 Searched Locations:
2022-12-06 01:29:15 
2022-12-06 01:29:15   /.prisma/client
2022-12-06 01:29:15   C:\Users\sooter\Documents\IOT\nimbit-service-mono\customer-apps\doppstadt\proemion-data-manager\node_modules\@prisma\doppstadt\proemion-data-manager
2022-12-06 01:29:15   /usr/src
2022-12-06 01:29:15   /usr/src/app
2022-12-06 01:29:15   /usr/src/app
2022-12-06 01:29:15   /tmp/prisma-engines
2022-12-06 01:29:15   /usr/src/app

@janpio
Copy link
Member

janpio commented May 16, 2023

This should be solved. Please open a new issue, if you still have a similar problem. Thanks.

@janpio janpio closed this as not planned Won't fix, can't repro, duplicate, stale May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. kind/bug A reported bug. team/client Issue for team Client. topic: deployment-platform topic: linux-musl
Projects
None yet
Development

No branches or pull requests

9 participants