-
Notifications
You must be signed in to change notification settings - Fork 84
Description
After I updated the optimizley-sdk to version 4.4.0 my build process started to fail
I am using typescript(4.0.5) and I started to get the following errors after the upgrade:
node_modules/@optimizely/optimizely-sdk/lib/optimizely/index.ts:150:11 - error TS2322: Type 'UserProfileService' is not assignable to type 'null'.
150 userProfileService = config.userProfileService;
~~~~~~~~~~~~~~~~~~
node_modules/@optimizely/optimizely-sdk/lib/optimizely/index.ts:335:7 - error TS2322: Type 'string' is not assignable to type 'null'.
335 variationId = projectConfig.getVariationIdFromExperimentAndVariationKey(configObj, experimentKey, variationKey);
~~~~~~~~~~~
node_modules/@optimizely/optimizely-sdk/lib/optimizely/index.ts:336:7 - error TS2322: Type 'string' is not assignable to type 'null'.
336 experimentId = projectConfig.getExperimentId(configObj, experimentKey);
~~~~~~~~~~~~
I have downgraded the SDK to version 4.3.4 and everything works as expected.
@optimizely/optimizely-sdk version: 4.4.0
node version: 12.17
npm version: 6.14.4