Skip to content

Dynamic import callback #39

Description

@bart-sofomo

Hi,
I'm trying to make it working with prisma 7 and jest and I'm constantly getting:

    TypeError: A dynamic import callback was invoked without --experimental-vm-modules

      823 |
      824 | export const vePrismockClient = async () => {
    > 825 |   return await getClient({
          |                         ^
      826 |     prismaClient: PrismaClient,
      827 |     schemaPath: '../prisma/schema.prisma',
      828 |   });

      at ../../node_modules/@pkgverse/prismock/dist/v6/index.cjs:4934:78
      at generateDMMF (../../node_modules/@pkgverse/prismock/dist/v6/index.cjs:4945:5)
      at getClient (../../node_modules/@pkgverse/prismock/dist/v6/index.cjs:5424:27)
      at vePrismockClient (src/test/prismock.util.ts:825:25)
      at createPrismockTestModule (src/test/prismock.util.ts:857:37)
      at Object.<anonymous> (src/api/model/model.service.spec.ts:74:47)

I've added @pkgvers to transformIgnorePatterns in jest config but the issue still exists.
Do you know what could be causing that?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions