Importing from NPM returns an empty object

#1

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 1.7.0.3 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.

#2

Might be related here:

1 Like
#3

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");