Open SebTVisage opened 1 year ago
Hey @SebTVisage , what's getAll
?
Ok actually it's the same with isFeatureEnabled
.
Sorry I meant getAllFlags
(mentioned in the docs). I've edited the issue
Hmm, just tested the library again, I don't face the same.
How're you using the library? Some reproduction instructions would be nice.
On a node 12 project using TS. I'll try to give you a reproduction repo. I do this more or less:
import { PostHog } from 'posthog-node';
import config from '../config';
export const postHogClient = new PostHog(config.thirdParties.posthog.apiKey, {
personalApiKey: config.thirdParties.posthog.personalKey,
});
// In another file:
import { postHogClient } from '<path to file above>';
// In a function I do just something like this
const featureFlags = await postHogClient.getAllFlags('some-user-id');
I'll try to do a reproduction repo
For a quick check, we're using node 16, try if that works? Might mean we need to update the supported node versions 🤔
This will be fixed here but it does bump the minimum version to v14.7.0 https://github.com/PostHog/posthog-js-lite/pull/22
Hi. I'm using posthog-node 2.0.2 and I get the following error when calling
getAllFlags
: