#Prisma Optimize CommonJS Issue

4 messages · Page 1 of 1 (latest)

peak shard
#

See: #🧠│ask-ai message

Really wanted to give optimize a shot, but running into issues getting it started.
My package.json:

// deps:
// prisma
"@prisma/client": "^6.11.1",
"@prisma/extension-optimize": "^2.0.0",
"@prisma/instrumentation": "^6.11.1",
// otel
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/exporter-logs-otlp-http": "^0.57.2",
"@opentelemetry/exporter-trace-otlp-http": "^0.57.2",
"@opentelemetry/instrumentation": "^0.57.2",
"@opentelemetry/resources": "^1.30.1",
"@opentelemetry/sdk-node": "^0.57.2",
"@opentelemetry/sdk-trace-node": "^1.30.1",
"@opentelemetry/semantic-conventions": "^1.28.0",

// devDeps:
"prisma": "^6.11.1",

Interesting part of the trace:

SyntaxError: Named export 'PrismaInstrumentation' not found. The requested module 'prisma-instrumentation-5-x' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'prisma-instrumentation-5-x';

Could post the full trace but it's just more of the transpiled js.

slate reefBOT
#

You're in no rush, so we'll let a dev step in. Enjoy your coffee, or drop into #ask-ai if you get antsy for a second opinion!

sullen idol
#

Can you check with the latest prisma version 6.12 and check if you get the same error?

peak shard
#

No dice, same error