Importing from NPM returns an empty object


This is the first time I’m trying to use the node-oracledb (version 2.3.0) npm package in Meteor.
This is a Meteor project, and when I import on a server file with the following syntax, the oracledb object contains an empty object:

import oracledb from "oracledb";
console.log("oracledb", oracledb); // this prints an empty object

This is probably a basic mistake on my side, but I’ve not been able to sort this out yet.
Anyone with experience on that? I’d really appreciate.


Might be related here:

1 Like

Thanks @rjdavid, looks indeed related.
I switched to the following syntax, and it works fine now:

const oracledb = require("oracledb");

If I try using any of the options below, it fails (returns an empty object):

import oracledb_1 from "oracledb";
const oracledb_2 = Npm.require("oracledb");