当使用npm install --ignore-scripts --omit=dev
安装bcrypt或argon2时,我得到了错误
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
可以是什么,或者如何解决?
1条答案
按热度按时间thtygnil1#
解决方法很简单,只要按照下面的命令:
npm install argon2 --ignore-script
npm install -g node-pre-gyp
node-pre-gyp rebuild -C ./node_modules/argon2