-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
When using import Clockify from 'clockify-ts' in an .mjs file and trying to use it, I'm getting an error:
const test = new Clockify('');
^
TypeError: Clockify is not a constructorMy entire project setup:
index.mjs
import Clockify from 'clockify-ts';
const test = new Clockify('');package.json
{
"main": "index.mjs",
"dependencies": {
"clockify-ts": "^1.2108.13"
},
"scripts": {
"start": "node ."
}
}I can get this to work by using
import * as Clockify from 'clockify-ts';
const test = new Clockify.default.default(''); // doubled .default !!!but I think you should fix your build config, because clearly something is wrong.
I see this was already reported in #12 - however the issue was resolved as OP thought it was a problem with his project config. I believe the problem lies in this library.
Metadata
Metadata
Assignees
Labels
No labels