【发布时间】:2019-08-30 10:46:19
【问题描述】:
我想通过节点 js 连接 oracle 数据库。为此,我尝试安装 node-oracledb 模块。
$ npm install oracle/node-oracledb#v3.1.2
这会引发以下错误消息。
oracledb@3.1.2 安装 C:\Users\Desktop\WebApp\node-oracle-db\node_modules\oracledb 节点gyp重建
C:\Users\Desktop\WebApp\node-oracle-db\node_modules\oracledb>如果没有 定义 npm_config_node_gyp (节点 "C:\Program 文件\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" 重建)否则(节点“C:\ Program 文件\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" 重建)gyp ERR!配置错误gyp ERR!堆栈错误:找不到 Python 可执行文件“python”,您可以设置 PYTHON 环境变量。石膏 呃!堆栈在 PythonFinder.failNoPython (C:\Program 文件\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19) 吉普错误! PythonFinder 的堆栈。 (C:\程序 文件\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16) 吉普错误!堆栈在 C:\Program 文件\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29 吉普错误!堆栈在 FSReqWrap.oncomplete (fs.js:166:21) gyp ERR! 系统 Windows_NT 10.0.14393 gyp 错误!命令“C:\程序 文件\nodejs\node.exe" "C:\Program 文件\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" “重建” gyp ERR! cwd C:\Users\Desktop\WebApp\node-oracle-db\node_modules\oracledb gyp 错误! 节点 -v v9.5.0 gyp 错误!节点-gyp -v v3.6.2 gyp 错误!不好 npm 警告 oracle-db@1.0.0 没有描述 npm WARN oracle-db@1.0.0 没有存储库 字段。
npm 错误!代码 ELIFECYCLE npm 错误! errno 1 npm 错误! oracledb@3.1.2 安装:
node-gyp rebuildnpm 错误!退出状态 1 npm ERR! npm 错误! oracledb@3.1.2 安装脚本失败。 npm 错误!这大概是 npm 没问题。可能有额外的日志输出 以上。npm 错误!可以在以下位置找到此运行的完整日志:npm ERR!
C:\Users\AppData\Roaming\npm-cache_logs\2019-04-09T06_36_44_005Z-debug.log
我不明白为什么我需要有 python 依赖才能连接 oracle db?以及如何做到这一点?
【问题讨论】:
标签: node.js npm node-oracledb