node.js - Server 2008 Node js上的Oracle模块安装: specified procedure could not be found

标签 node.js oracle

在我在笔记本和虚拟机上大量使用 oracle 模块后,我尝试将其安装在服务器上。 服务器运行 Windows Server 2008 R2 x64。经过许多问题后,安装成功了。只有一些警告,没有错误。现在我想启动我的 Node.js 文件。它在我的笔记本上运行良好,但在服务器上则不然。它显示以下错误:

C:\Users\sgrzbielok\node>node httpstream.js

module.js:356
  Module._extensions[extension](this, filename);
                               ^
Error: The specified procedure could not be found.
C:\Users\sgrzbielok\node\node_modules\oracle\build\Release\oracle_bindings.node

    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (C:\Users\sgrzbielok\node\node_modules\oracle\lib\orac
le.js:2:16)

    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

Google 搜索了该错误,但找不到解决方案。有人可以帮忙吗?

最佳答案

今天,当我尝试重新安装 node-oracle 时,我在 Windows 2008 R2 x64 服务器上遇到了同样的问题。这意味着 oracle_bindings.node 未正确构建。由于某种原因,当我使用 npm install -g node-gyp 安装它时,node-gyp 没有下载它的所有依赖项。 。检查C:\Users\<username>\AppData\Roaming\npm\node_modules\node-gyp\node_modules\您的工作设置的目录(即笔记本和/或虚拟机)。您应该看到 node-gyp 的依赖项:.bin、fstream、glob、graceful-fs 等。 将所有这些模块一一安装到 2008 服务器上,或者将所有模块文件夹复制到 2008 服务器上的同一目标。然后我卸载并重新安装了node-oracle,它就工作了。

如果 node-gyp 似乎不是问题,请确保您的 PATH 变量在实际 Oracle 路径之前列出了 Instant Client:

Path=C:\instantclient_12_1\vc10;C:\instantclient_12_1\;C:\oracle\product\11.2.0\dbhome_1\bin;%PATH%

但是,路径顺序问题更类似于 "Error: The specified 模块 could not be found."消息。

关于node.js - Server 2008 Node js上的Oracle模块安装: specified procedure could not be found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25995783/

相关文章:

c# - 如何从 C# (.net 3.5) 连接 Node.js 服务器

node.js - Express.js通过post方式发送数据获取请求

java - 使用并行处理加速选择查询

regex - 如何支持 Oracle 的 DBMS_UTILITY.COMMA_TO_TABLE + REGEXP_REPLACE 的多个分割字符,例如 ',' 、 ';' 或 '|'

oracle - 将日期转换为 key 失败

javascript - 从大文件流式传输并创建数组

javascript - 错误 : ReferenceError: document is not defined

node.js - 运行 `yarn`时如何更改主目录?

xml - Oracle 的 xmlserializer 中的尾随空格

sql - 有没有办法从oracledb中选择以名称为关键字的列形式表?