Open
Description
- Operating System Name where ibm_db is installed: Windows 10
- Target Db2 Server Version or output of
db2level
command from Db2 database system: N/A
> node -v
20.18.2
> npm ls ibm_db
[email protected] C:\Users\WDAGUtilityAccount\test-proj
-- [email protected]
C:\Users\WDAGUtilityAccount\test-proj>echo %IBM_DB_HOME%
%IBM_DB_HOME%
C:\Users\WDAGUtilityAccount\test-proj>echo %PATH%
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\WDAGUtilityAccount\scoop\apps\nodejs\current\bin;C:\Users\WDAGUtilityAccount\scoop\apps\nodejs\current;C:\Users\WDAGUtilityAccount\scoop\shims;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps
C:\Users\WDAGUtilityAccount\test-proj>echo %LIB%
%LIB%
Steps to Reproduce:
In Windows Sandbox or an environment w/o the CRT available:
mkdir test-proj
cd test-proj
npm init -y
npm install ibm_db
node -i
- In the REPL, type
const ibmDb = await import("ibm_db")
- See the error message during import:
These steps work with [email protected]
but not with [email protected]
.
Possible solution:
Bundling the CRT as a static library may resolve this issue - we faced a similar situation in a Zowe node package where a Node-native module could not be found in environments without CRT. Compiling our Node-native binaries with a static C runtime resolved this for our scenario, so I figured it was worth mentioning here.
Metadata
Assignees
Labels
No labels