47ng / prisma-field-encryption

Transparent field-level encryption at rest for Prisma
https://github.com/franky47/prisma-field-encryption-sandbox
MIT License
223 stars 27 forks source link

Heads up about prisma 5.16.0 and "Error: no encryption key provided." #115

Closed mdmower-csnw closed 1 week ago

mdmower-csnw commented 2 weeks ago

This is just a heads-up about a potential red herring when prisma-field-encryption is used in conjunction with prisma 5.16.0. The first error I encountered after updating prisma was:

Error: [prisma-field-encryption] Error: no encryption key provided.
    at configureKeys (<path-sanitized>\node_modules\prisma-field-encryption\dist\encryption.js:18:15)
    at fieldEncryptionExtension (<path-sanitized>\node_modules\prisma-field-encryption\dist\extension.js:10:49)
    at Object.<anonymous> (<path-sanitized>\src\db\prisma-client.ts:5:63)
    at Module._compile (node:internal/modules/cjs/loader:1364:14)
    at Module.m._compile (<path-sanitized>\node_modules\ts-node\src\index.ts:1618:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
    at Object.require.extensions.<computed> [as .ts] (<path-sanitized>\node_modules\ts-node\src\index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1019:12)
    at Module.require (node:internal/modules/cjs/loader:1231:19)

It took me a while to figure out that the issue came from prisma, see https://github.com/prisma/prisma/issues/24634 . So, no action needed here; just avoid prisma 5.16.0 (either use 5.15.1 or wait for 5.16.1).

franky47 commented 1 week ago

Thanks for the heads-up! Prisma 5.16.1 has just been released.