Skip to content

Conversation

@fm96-dev
Copy link

@fm96-dev fm96-dev commented Jun 5, 2023

I'm using this package on a fastify, prisma and node-tap project and it gives me this error: Error: Cannot find module '..../node_modules/prisma-factory/dist/generated.js'.

I've noticed that in prisma-factory's pacakge.json is defined the "exports" field. In particular, the "./*" option is causing this error, since the import {...} from "prisma-factory/generated" will be redirected to the dist folder. So I've added an option for the "generated" folder to point to the correct file, solving the problem.

P.S.: I'm using pnpm as package manager.

fixes #17

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ENOENT when trying to use generated functions with Jest

1 participant