Open TTalex opened 2 years ago
@TTalex I'm using TypeScript, import Sellsy from 'node-sellsy';
is working fine.
Did you tried to use ES6 import
keyword ?
@simon-tannai No issues with import indeed, but the quickstart tutorial does use the require call, so maybe it's a documentation problem ?
Hey,
It looks like last November commits broke the example code in Nodejs.
Outputs
TypeError: Sellsy is not a constructor
Example on runkit (node v17.3.1, node-sellsy v1.5.5): https://runkit.com/embed/ua0v5yaqhk9c
Adding .default to the require seems to fix the issue for now.
var Sellsy = require("node-sellsy").default;
I'm guessing something changed with the exports ?