Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add "generated" option in package.json's exports field #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fech-dev
Copy link

@fech-dev fech-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