Reputation: 391
When installing bcrypt or argon2 using npm install --ignore-scripts --omit=dev
I got the error
app-1 | node:internal/modules/cjs/loader:998
app-1 | throw err;
app-1 | ^
app-1 |
app-1 | Error: Cannot find module './lib/binding/napi-v3/argon2.node'
app-1 | Require stack:
app-1 | - /app/node_modules/argon2/argon2.js
What can be, or how to solve?
Upvotes: 5
Views: 2078
Reputation: 13
This solution worked for me, just uninstall argon2 and install it again:
npm uninstall argon2
npm i argon2
Upvotes: -1
Reputation: 279
The solution is very simple. Just follow command below:
npm install argon2 --ignore-script
npm install -g node-pre-gyp
node-pre-gyp rebuild -C ./node_modules/argon2
Upvotes: 6