Skip to content

Using v5.3 with typescript > 4.3.x brings error "Cannot read properties of undefined (reading '_initOracleClient')" #1462

@maku

Description

@maku
  1. What versions are you using?

Give your database version:
Oracle Database 18c Standard Edition 2 Release 18.0.0.0.0 - Production

Also run Node.js and show the output of:

process.platform win32
process.version: v16.13.0
process.arch: x64

node dependency "oracledb": "5.3.0"
  1. Is it an error or a hang or a crash?

    error

  2. What error(s) or behavior you are seeing?

oracledb.js -> function initOracleClient -> Line 144 this is undefined

Uncaught TypeError: Cannot read properties of undefined (reading '_initOracleClient')

The same functionality works with typescript <= 4.3.x, with typescript >= 4.4 I get the error

example typescript code:

import { ConnectionAttributes, initOracleClient, Connection, getConnection } from 'oracledb';
...
initOracleClient({ libDir: process.env[ORACLE_CLIENT_LIBDIR] });

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions