-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
typescript error in the build process #608
Comments
I can confirm I'm seeing this as well. The odd part is that the SDK is packaged with .d.ts files for the compiled JS, so it's not clear why its being installed with the source .ts files (in my understanding, these should be eliminated via a .npmignore file). |
I'm using SDK version |
@mackovershay Until the issue has been resolved on Optimizely's end, using |
Thanks @mackovershay @chris-armstrong @gitrkaplan for reporting this issue. We merged #611 and released it in v4.4.1 |
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.0node
version: 12.17npm
version: 6.14.4The text was updated successfully, but these errors were encountered: