Skip to content

ENOENT when trying to use generated functions with Jest #17

Description

@zacwebb

Hey there,

Thanks for the work on this package - looks great! 😁

Any chance you'd know why Jest is struggling to find the generated index.js? I get the following error:
ENOENT: no such file or directory, open '/{path to code}/node_modules/prisma-factory/dist/generated.js'

Example of my code:

import { createUserFactory } from 'prisma-factory/generated';

export const UserFactory = createUserFactory({
    email: 'test@example.com',
    password: '123',
    verified: true,
});

I've checked that the generated code is there inside node_modules – not sure if this is an issue with my jest/typescript config or a package issue?

Thanks again

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions