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 4.3.1 distribution is bundling a libquery_engine #15244

Closed
mwillbanks opened this issue Sep 8, 2022 · 4 comments · Fixed by #16649
Closed

Prisma 4.3.1 distribution is bundling a libquery_engine #15244

mwillbanks opened this issue Sep 8, 2022 · 4 comments · Fixed by #16649
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. team/client Issue for team Client. tech/typescript Issue for tech TypeScript. topic: internal
Milestone

Comments

@mwillbanks
Copy link

Bug description

The prisma distribution is bundling the debian libquery engine which results in larger runtime builds and can cause issues when deploying to lambda via zip.

ls node_modules/@prisma/internals/dist/libquery_engine-*                                                                                                                                
node_modules/@prisma/internals/dist/libquery_engine-debian-openssl-1.1.x.so.node

How to reproduce

  1. yarn add @prisma/client or npm install @prisma/client
  2. ls node_modules/@prisma/internals/dist/libquery_engine-*

Expected behavior

The libquery_engine for debian or any OS for that matter would not be within the internals/dist.

Prisma information

Not relevant.

Environment & setup

  • OS: macOS
  • Database: PostgreSQL
  • Node.js version: v16.17.0

Prisma Version

Environment variables loaded from .env
prisma                  : 4.3.1
@prisma/client          : 4.3.1
Current platform        : darwin
Query Engine (Node-API) : libquery-engine c875e43600dfe042452e0b868f7a48b817b9640b (at node_modules/@prisma/engines/libquery_engine-darwin.dylib.node)
Migration Engine        : migration-engine-cli c875e43600dfe042452e0b868f7a48b817b9640b (at node_modules/@prisma/engines/migration-engine-darwin)
Introspection Engine    : introspection-core c875e43600dfe042452e0b868f7a48b817b9640b (at node_modules/@prisma/engines/introspection-engine-darwin)
Format Binary           : prisma-fmt c875e43600dfe042452e0b868f7a48b817b9640b (at node_modules/@prisma/engines/prisma-fmt-darwin)
Format Wasm             : @prisma/prisma-fmt-wasm 4.3.0-32.c875e43600dfe042452e0b868f7a48b817b9640b
Default Engines Hash    : c875e43600dfe042452e0b868f7a48b817b9640b
Studio                  : 0.473.0
@mwillbanks mwillbanks added the kind/bug A reported bug. label Sep 8, 2022
@janpio janpio added the bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. label Sep 8, 2022
@millsp
Copy link
Member

millsp commented Sep 8, 2022

Hey @mwillbanks, we are aware that is this an issue, but you should not get @prisma/internals installed via @prisma/client or prisma. Can you please double check that you did not include @prisma/internals in your dependencies or via a third-party dependency (eg. a prisma generator, etc...)?

@danstarns danstarns added the team/client Issue for team Client. label Sep 12, 2022
@mwillbanks
Copy link
Author

So this is getting included on my side unfortunately because we have typegraphql-prisma as a dependency which should have been a dev-dependency. so you are correct in that it is being hoisted from something else.

@millsp
Copy link
Member

millsp commented Sep 14, 2022

Awesome. I will keep this issue around for us to actually stop publishing engines too. Thanks!

Jolg42 added a commit that referenced this issue Dec 6, 2022
Closes #15244
Related #14141

Before https://www.npmjs.com/package/@prisma/internals
Unpacked Size 124 MB

After, from `pnpm publish --dry-run --no-git-checks`
npm notice package size:  77.7 kB
npm notice unpacked size: 397.7 kB
@Jolg42 Jolg42 added this to the 4.8.0 milestone Dec 6, 2022
@Jolg42 Jolg42 added bug/2-confirmed Bug has been reproduced and confirmed. and removed bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. process/candidate labels Dec 6, 2022
@Jolg42
Copy link
Member

Jolg42 commented Dec 7, 2022

@mwillbanks Thanks for this issue, I created and merged a PR about this 🙌🏼

@prisma/internals unpacked package went from 124.4 MB to 395.4 kB 😅

After Prisma version 4.8.0 is released (December 20th) you will have to wait for it to be bumped in a new version of typegraphql-prisma I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. team/client Issue for team Client. tech/typescript Issue for tech TypeScript. topic: internal
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants