My Node.js builds have begun erroring with Prisma ORM db connection issues

eatoncwPRO

5 months ago

My builds began erroring - this is related to Prisma db not finding environment variables apparently. I have tried the following:

  • Rolling back my code - same issue

  • Hard coded my DATABASE_URL - no change

  • Checking my database schema - it is valid

  • Running a different prisma command - npx prisma -v - this actually errors too with a similar message that it cannot find environment variables.

I am not really sure what has changed (again I rolled back my code and the issue persists)

Typically when I run the command npx prisma version I get something like this (locally):
```
prisma                  : 4.8.0

@prisma/client          : 4.8.0

Current platform        : darwin-arm64

Query Engine (Node-API) : libquery-engine d6e67a83f971b175a593ccc12e15c4a757f93ffe (at node_modules/@prisma/engines/libquery_engine-darwin-arm64.dylib.node)

Migration Engine        : migration-engine-cli d6e67a83f971b175a593ccc12e15c4a757f93ffe (at node_modules/@prisma/engines/migration-engine-darwin-arm64)

Introspection Engine    : introspection-core d6e67a83f971b175a593ccc12e15c4a757f93ffe (at node_modules/@prisma/engines/introspection-engine-darwin-arm64)

Format Binary           : prisma-fmt d6e67a83f971b175a593ccc12e15c4a757f93ffe (at node_modules/@prisma/engines/prisma-fmt-darwin-arm64)

Format Wasm             : @prisma/prisma-fmt-wasm 4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe

Default Engines Hash    : d6e67a83f971b175a593ccc12e15c4a757f93ffe

Studio                  : 0.479.0
```

When I run this command from my Dockerfile I get this:
``` prisma : 4.8.0

@prisma/client : 4.8.0

Current platform : linux-musl

Query Engine (Node-API) : E_CANNOT_RESOLVE_VERSION (at node_modules/@prisma/engines/libquery_engine-linux-musl.so.node)

Migration Engine : E_CANNOT_RESOLVE_VERSION (at node_modules/@prisma/engines/migration-engine-linux-musl)

Introspection Engine : E_CANNOT_RESOLVE_VERSION (at node_modules/@prisma/engines/introspection-engine-linux-musl)

Format Binary : prisma-fmt d6e67a83f971b175a593ccc12e15c4a757f93ffe (at node_modules/@prisma/engines/prisma-fmt-linux-musl)

Format Wasm : @prisma/prisma-fmt-wasm 4.8.0-61.d6e67a83f971b175a593ccc12e15c4a757f93ffe

Default Engines Hash : d6e67a83f971b175a593ccc12e15c4a757f93ffe

Studio : 0.479.0```

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

Solved

4 Replies

eatoncwPRO

5 months ago

The reason I am posting here and not on Prisma is I haven't changed Prisma versions.


eatoncwPRO

5 months ago

Update - I have now added `

RUN apk update && apk add --no-cache openssl 

And I can build successfully again.

I am not sure why this is suddenly required.


eatoncw

Update - I have now added `RUN apk update && apk add --no-cache opensslAnd I can build successfully again.I am not sure why this is suddenly required.

eatoncwPRO

5 months ago

Looks like this is most likely related to a Docker Hub update to

node:18-alpine

I'm suddenly seeing the same behavior in my CI environments that use the same image. So fine to close this out


5 months ago

Hi Christopher,

Thank you for the report, and for letting us know you've identified and resolved the issue. We'll go ahead and close out this thread.

Regards,
Christian


Status changed to Awaiting User Response railway[bot] 5 months ago


Status changed to Solved christian 5 months ago