Skip to content

feat: Allow to set Prisma Engine directory in config #1815

@luap2703

Description

@luap2703

Provide environment information

System:
OS: macOS 15.2
CPU: (12) arm64 Apple M2 Pro
Memory: 74.70 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.19.0 - /opt/homebrew/bin/node
Yarn: 4.5.1 - /opt/homebrew/bin/yarn
npm: 10.8.2 - /opt/homebrew/bin/npm

Describe the bug

For the prismaExtension, it is currently not possible to define the path/directory of the engine files required to run.

We're having a large monorepo and the engine file is nested.

While we can copy it using:

   additionalFiles({
                files: [
                    "packages/core/core-prisma/node_modules/.prisma/client/libquery_engine-darwin-arm64.dylib.node",
                ],
            }),

prisma won't search in the copied directory.

Three ways to mitiage this would be:

  1. Allowing the additionalFiles to not only define the file directory, but also a relative path where to copy it into the .trigger folder
 additionalFiles({
                files: [
                    { from: "abc/def", to: "tmp/put_it_here" },
                ],
            }),,
  1. Add a additionalFiles prop to the prisma exension, allowing for copying the files or setting env variables for the run
  2. Set the env variable as PRISMA_QUERY_ENGINE_LIBRARY for prisma, but this isn't really possible for us as it is clashing with other parts/deployments of the repo

Reproduction repo

To reproduce

Demo setup + move the engine file somewhere.

Additional information

This is truly one of the greatest projects we've seen for a long time(!!!). We have been spending literally MONTHS in time on debugging and running AWS lambdas, eventually moving to batch/fargate tasks, step functions, etc. etc..

The dev experience is 1000x better! Props on you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions