Open penfold45 opened 11 months ago
I have same issue as OP - basically for node-js SDK it seems the import
method requires initialising Mixpanel with both project token and secret. Given the type of InitConfig
was just Record<string, any> before is it just a matter of adding a secret: string
to InitConfig
?
As taken from readme:
var mixpanel_importer = Mixpanel.init('valid mixpanel token', {
secret: 'valid api secret for project'
});
edit: I see theres currently an open PR for this exact issue: https://github.com/mixpanel/mixpanel-node/pull/225
edit: as a workaround, albeit not ideal - you can just typecast the config object
this.mixpanel = Mixpanel.init(projectToken, {
debug: true,
secret: "YOUR_SECRET",
} as unknown as Mixpanel.InitConfig);
Seeing same thing
library is aware that this config is needed:
Will sling a PR to make this go away
In commit 600d6abee19aa83af7b2c43525d57fdc2b758ee7. InitConfig was updated as per bellow However
secret
is not listed here. I assume this was not intentional as the option is still defined in README.Obviously now I have typescript issues