node连接oracle报错。
发布于 6 年前 作者 Arthur-lt 5349 次浏览 来自 问答

D:\code\node\node_modules_oracledb@2.3.0@oracledb\lib\oracledb.js:65 throw new Error(nodbUtil.getErrorMessage(‘NJS-045’, nodeInfo)); ^

Error: NJS-045: cannot load the oracledb add-on binary for Node.js 8.11.3 (win32 , x64) Node.js require() error was: DPI-1047: 64-bit Oracle Client library cannot be loaded: “The specified module could not be found”. See https://oracle.github.io/odpi/doc/installation.html#wi ndows for help Node.js require() mapped to D:\code\node\node_modules_oracledb@2.3.0@oracledb\b uild\Release\oracledb.node Node-oracledb installation instructions: https://oracle.github.io/node-oracledb/ INSTALL.html You must have 64-bit Oracle client libraries in your PATH environment variable. If you do not have Oracle Database on this computer, then install the Instant Cl ient Basic or Basic Light package from http://www.oracle.com/technetwork/topics/winx64soft-089540.html A Microsoft Visual Studio Redistributable suitable for your Oracle client librar y version must be available.

at Object.<anonymous> (D:\code\node\node_modules\_oracledb@2.3.0[@oracledb](/user/oracledb)\li

b\oracledb.js:65:13) at Module._compile (module.js:652:30) at Object.Module._extensions…js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object.<anonymous> (D:\code\node\node_modules_oracledb@2.3.0@oracledb\in dex.js:1:80) at Module._compile (module.js:652:30) 有大神指导原因吗

2 回复

没安装Oracle Instant Client吧(链接), 看你是在windows上运行的 可以参照这篇文档 安装

好的。谢谢哥

回到顶部