node.bcrypt.js icon indicating copy to clipboard operation
node.bcrypt.js copied to clipboard

package json does not exist

Open raptorsj opened this issue 3 years ago • 5 comments

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

<project Path>\node_modules\bcrypt\package.jsondoes not exist

node version : 18 written logic in typescript

raptorsj avatar Nov 21 '22 10:11 raptorsj

Same problem here

mikevercoelen avatar Nov 30 '22 19:11 mikevercoelen

@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)

pallasite99 avatar Mar 12 '23 06:03 pallasite99

I have the same problem, node 18 with typescript

lucasdellasala avatar Mar 17 '23 21:03 lucasdellasala

Have you been able to make it work? @raptorsj

lucasdellasala avatar Mar 17 '23 21:03 lucasdellasala

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.

caricati avatar Mar 06 '24 17:03 caricati