Skip to content

Fix Bcrypt Package To BcryptJS#68

Open
taljacob2 wants to merge 1 commit into
mainfrom
fix-bcrypt-package
Open

Fix Bcrypt Package To BcryptJS#68
taljacob2 wants to merge 1 commit into
mainfrom
fix-bcrypt-package

Conversation

@taljacob2
Copy link
Copy Markdown
Collaborator

Replace bcrypt package with bcryptjs to fix the error:

PS I:\Tal\Code\js\InsightHub\insighthub-backend> npm run dev

> ex@1.0.0 dev
> nodemon ./src/server.ts

[nodemon] 3.1.9
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: ts,json
[nodemon] starting `ts-node ./src/server.ts`
Error: \\?\I:\Tal\Code\js\InsightHub\insighthub-backend\node_modules\bcrypt\lib\binding\napi-v3\bcrypt_lib.node is not a valid Win32 application.
\\?\I:\Tal\Code\js\InsightHub\insighthub-backend\node_modules\bcrypt\lib\binding\napi-v3\bcrypt_lib.node
    at Object..node (node:internal/modules/cjs/loader:1725:18)
    at Module.load (node:internal/modules/cjs/loader:1313:32)
    at Function._load (node:internal/modules/cjs/loader:1123:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
    at Module.require (node:internal/modules/cjs/loader:1335:12)
    at require (node:internal/modules/helpers:136:16)
    at Object.<anonymous> (I:\Tal\Code\js\InsightHub\insighthub-backend\node_modules\bcrypt\bcrypt.js:6:16)
    at Module._compile (node:internal/modules/cjs/loader:1562:14)
    at node:internal/modules/cjs/loader:1699:10 {
  code: 'ERR_DLOPEN_FAILED'
}
[nodemon] app crashed - waiting for file changes before starting...

Replace `bcrypt` package with `bcryptjs` to fix the error:

```
PS I:\Tal\Code\js\InsightHub\insighthub-backend> npm run dev

> ex@1.0.0 dev
> nodemon ./src/server.ts

[nodemon] 3.1.9
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: ts,json
[nodemon] starting `ts-node ./src/server.ts`
Error: \\?\I:\Tal\Code\js\InsightHub\insighthub-backend\node_modules\bcrypt\lib\binding\napi-v3\bcrypt_lib.node is not a valid Win32 application.
\\?\I:\Tal\Code\js\InsightHub\insighthub-backend\node_modules\bcrypt\lib\binding\napi-v3\bcrypt_lib.node
    at Object..node (node:internal/modules/cjs/loader:1725:18)
    at Module.load (node:internal/modules/cjs/loader:1313:32)
    at Function._load (node:internal/modules/cjs/loader:1123:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
    at Module.require (node:internal/modules/cjs/loader:1335:12)
    at require (node:internal/modules/helpers:136:16)
    at Object.<anonymous> (I:\Tal\Code\js\InsightHub\insighthub-backend\node_modules\bcrypt\bcrypt.js:6:16)
    at Module._compile (node:internal/modules/cjs/loader:1562:14)
    at node:internal/modules/cjs/loader:1699:10 {
  code: 'ERR_DLOPEN_FAILED'
}
[nodemon] app crashed - waiting for file changes before starting...
```

Signed-off-by: Tal Jacob <taljacob2@gmail.com>
@taljacob2 taljacob2 added bug Something isn't working backend labels Mar 23, 2025
@taljacob2 taljacob2 self-assigned this Mar 23, 2025
@taljacob2 taljacob2 moved this to In Review in Insight Hub Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend bug Something isn't working

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

1 participant