kelektiv / node.bcrypt.js

bcrypt for NodeJs
MIT License
7.4k stars 512 forks source link

package json does not exist #971

Open raptorsj opened 1 year ago

raptorsj commented 1 year ago

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 commented 1 year ago

Same problem here

pallasite99 commented 1 year ago

@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 commented 1 year ago

I have the same problem, node 18 with typescript

lucasdellasala commented 1 year ago

Have you been able to make it work? @raptorsj

caricati commented 4 months ago

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.