#Error when building package that uses Prisma types

6 messages · Page 1 of 1 (latest)

potent coral
#

as i run my tsup build command, i get this error coming from generated prisma folder

Error: ImportEquals should have a literal source.

   5 |
   6 | import * as runtime from './runtime/library.js';
>  7 | import $Types = runtime.Types // general types
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   8 | import $Public = runtime.Types.Public
   9 | import $Utils = runtime.Types.Utils
  10 | import $Extensions = runtime.Types.Extensions

this error occurs when tsup generates DTS
the type i export with my package is

type FindFirstField = Prisma.Args<typeof db.field, 'findFirst'>

(if i do not include this package in the exported index.ts, it all works)

daring emberBOT
#

You selected the carefully hand-crafted route. A dev artisan will respond soon. Meanwhile, the #ask-ai channel awaits if you're curious!

potent coral
cosmic bridge
#

Is this happening in the latest prisma version 6.12.0?

potent coral
potent coral
#

thanks it did work