PrismaP
Prisma7mo ago
6 replies
piscopancer

Error when building package that uses Prisma types

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)
Was this page helpful?