节点中的Argon2无法在Windows32上运行?

时间:2019-10-13 15:21:58

标签: node.js

我使用npm i argon2在Windows32上的节点应用程序中安装了argon2。 在全局安装npm i node-addon-api和node-pre-gyp之前。

我用const argon2 = require('argon2');称呼它 并运行代码,我的应用程序将崩溃,并在控制台中指出对于Windows32无效。有人可以帮我吗?我不想在计算机上安装Windows64。不能是真的,还是? 控制台状态:

internal/modules/cjs/loader.js:805
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: `FILE PATH` express mongodb - `FILE PATH`\node_modules\argon2\lib\binding\argon2.node is not a valid Win32 application.
`FILE PATH`\node express mongodb - `FILE PATH`\node_modules\argon2\lib\binding\argon2.node
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:805:18)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Object.<anonymous> (F:`FILE PATH`\node express mongodb - `FILE PATH`\node_modules\argon2\argon2.js:9:56)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (`FILE PATH`\models\userModel.js:5:16)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
[nodemon] app crashed - waiting for file changes before starting...

0 个答案:

没有答案