繁体   English   中英

oracledb 错误:NJS-067:未找到适用于 win32 ia32 的预构建节点 oracledb 二进制文件

[英]oracledb ERR! NJS-067: a pre-built node-oracledb binary was not found for win32 ia32

我无法在基于 vue 的电子应用程序中为 32 位目标安装 node-oracledb。 不幸的是我在https://github.com/oracle/node-oracledb/releases找不到任何预构建这是我的命令

npm install oracledb

这是错误。

npm ERR! code 87
npm ERR! path C:\Project\proj\node_modules\oracledb
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node package/install.js
npm ERR! oracledb ERR! NJS-067: a pre-built node-oracledb binary was not found for win32 ia32
npm ERR! oracledb ERR! Try compiling node-oracledb source code using https://oracle.github.io/node-oracledb/INSTALL.html#github

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\name\AppData\Local\npm-cache\_logs\2022-12-16T11_56_41_826Z-debug.log
PS C:\Project\proj> 

这是我的节点

C:\WINDOWS\system32>nvm current
v16.13.2
C:\WINDOWS\system32>npm --version
8.1.2
C:\WINDOWS\system32>nvm arch
System Default: 64-bit.
Currently Configured: 32-bit.

由于我在 nvm 中有 arch 32bit,并且由于不同的依赖关系,我需要安装 node-oracledb 32bit。 由于要求,根本没有使用 64 位的选项。

有两种解决方案对我有用。

1-第一个解决方案是直接从 url 安装

npm install https://github.com/oracle/node-oracledb/releases/download/v5.5.0/oracledb-5.5.0.tgz

2- 第二个解决方案是通过以下链接自行为所需环境构建 oracledb 包

就我而言,我必须处理以下事情。

  1. 使用的节点应该是 32 位的。
  2. 应设置 npm 的 MSbuild 工具
  3. 如果使用代理,则应为 npm 设置代理。
  4. 需要安装python

之后你可以从这样的文件安装

npm install file:path/oracledb-5.5.0.tgz

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM