Skip to content

Unable to build Prisma client #36

@IngwiePhoenix

Description

@IngwiePhoenix

Hello there!

I wanted to attempt work on a Docker image for the Nerimity backend so I could run it on my server properly, but in doing so, I wanted to first test the system locally. In doing so, I came across this error:

> pnpm run prisma:generate

> nerimity-server@1.0.0 prisma:generate C:\Users\Ingwie Phoenix\work\nerimity-server
> prisma generate

Failed to load config file "C:\Users\Ingwie Phoenix\work\nerimity-server" as a TypeScript/JavaScript module. Error: PrismaConfigEnvError: Cannot resolve environment variable: DATABASE_URL.
 ELIFECYCLE  Command failed with exit code 1.

This seemingly comes from here:

datasource: {
url: env('DATABASE_URL'),
},

I am not exactly familiar with Prisma, but I can see that the generation options are specified in prisma/schema.prisma as the docs would suggest.

What is the correct way to circumvent this while building the generator, so that the rest of the project properly builds/bundles?

Thanks and kind regards!

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