我目前正在 Google App Engine Standard env 上构建一个网络应用程序。使用 Node.js 10.16.3。我想使用Argon2 包。不幸的是,我不知道如何在 Windows7 上本地安装它,也不知道如何在 gcloud 上安装它。
包装页面上说:
“安装之前:在继续安装之前,您必须进行 node-gyp 全局安装,以及 GCC >= 5 / Clang >= 3.3。在 Windows 上,您必须在 Visual Studio 2015 或更高版本下编译。”
我已经在全球范围内安装了 node-gypnpm install -g node-gyp
以及所需的 Python 最新版本。我还安装了GCC,然后用来npm install argon2
安装我的项目所在的包。我不确定是否理解 Visual Studio 部分。
尝试使用 运行服务器时npm start
,出现此错误:
Error: myproject\node_modules\argon2\lib\binding\argon2.node is not a valid application
at Object.Module._extensions..node (internal/modules/cjs/loader.js:807: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 Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (C:\Users\me\myproject\node_modules\argon2\argon2.js:9:56)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789: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:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (C:\Users\me\myproject\www\server\server.js:3:16)
at Module._compile (internal/modules/cjs/loader.js:778:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! myproject@0.0.1 start: `node www/server/server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the myproject@0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.
我错过了什么吗?node-gyp
也不被认可