【发布时间】:2019-12-13 08:37:39
【问题描述】:
我正在将我的 aws lambda 函数从 8.11 更新到新的节点运行时 10.x。 为此,我将现有的 oracle 二进制文件 (node-oracledb 1.13.1) 更新为 (node-oracledb 4.1.0) 并将一个包发布到 npm 注册表中。更新 node-oracledb@4.1.0 后,当 lambda 函数之一尝试将数据插入 oracle db 时,我收到以下错误。
> "errorType": "Error",
> "errorMessage": "NJS-045: cannot load the oracledb add-on binary for Node.js 10.17.0 (linux, x64)\nCannot load
> /var/task/node_modules/polaris-oracledbtest-4-lambda/build/Release/oracledb.node\nThe
> module
> '/var/task/node_modules/polaris-oracledbtest-4-lambda/build/Release/oracledb.node'\nwas
> compiled against a different Node.js version
> using\nNODE_MODULE_VERSION 57. This version of Node.js
> requires\nNODE_MODULE_VERSION 64. Please try re-compiling or
> re-installing\nthe module (for instance, using `npm rebuild` or `npm
> install`).\nNode-oracledb installation instructions:
> https://oracle.github.io/node-oracledb/INSTALL.html\nYou must have
> 64-bit Oracle client libraries in LD_LIBRARY_PATH, or configured with
> ldconfig.\nIf you do not have Oracle Database on this computer, then
> install the Instant Client Basic or Basic Light package from
> \nhttp://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html\n",
> "stack": [
> "Error: NJS-045: cannot load the oracledb add-on binary for Node.js 10.17.0 (linux, x64)",
> "Cannot load /var/task/node_modules/polaris-oracledbtest-4-lambda/build/Release/oracledb.node",
> "The module '/var/task/node_modules/polaris-oracledbtest-4-lambda/build/Release/oracledb.node'",
> "was compiled against a different Node.js version using",
> "NODE_MODULE_VERSION 57. This version of Node.js requires",
> "NODE_MODULE_VERSION 64. Please try re-compiling or re-installing",
> "the module (for instance, using `npm rebuild` or `npm install`).",
> "Node-oracledb installation instructions: https://oracle.github.io/node-oracledb/INSTALL.html",
> "You must have 64-bit Oracle client libraries in LD_LIBRARY_PATH, or configured with ldconfig.",
> "If you do not have Oracle Database on this computer, then install the Instant Client Basic or Basic Light package from ",
> "http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html",
> "",
> " at Object.<anonymous> (/var/task/node_modules/polaris-oracledbtest-4-lambda/lib/oracledb.js:68:13)",
> " 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> (/var/task/node_modules/polaris-oracledbtest-4-lambda/index.js:1:18)",
> " at Module._compile (internal/modules/cjs/loader.js:778:30)"
> ]
【问题讨论】:
标签: node-oracledb