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

package json does not exist #971

Open
raptorsj opened this issue Nov 21, 2022 · 5 comments
Open

package json does not exist #971

raptorsj opened this issue Nov 21, 2022 · 5 comments

Comments

@raptorsj
Copy link

i installed bcrypt in my project and it is working but when i run the jest UT for my existing project it is throwing an error

\node_modules\bcrypt\package.jsondoes not exist

node version : 18
written logic in typescript

@mikevercoelen
Copy link

Same problem here

@pallasite99
Copy link

@raptorsj @mikevercoelen Have you tried including copying the package.json file during the typescript build?

Afaik you can control what to include / exclude during the build (transpile to JS)

@lucasdellasala
Copy link

I have the same problem, node 18 with typescript

@lucasdellasala
Copy link

Have you been able to make it work? @raptorsj

@caricati
Copy link

caricati commented Mar 6, 2024

I have the same problem here, but my problem was when I mocking the fs library with the jest. If you are mocking the fs lib like this:

jest.mock('fs')

You have a problem.

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

No branches or pull requests

6 participants
@mikevercoelen @caricati @raptorsj @pallasite99 @lucasdellasala and others