Skip to content

Type Error on 4.9.0 #732

Closed
Closed
@oudomsouk

Description

@oudomsouk

What I wanted to do

run npm run build for NextJS app with @optimizely/optimizely-sdk@^4.9.0

What actually happened

./node_modules/@optimizely/optimizely-sdk/lib/core/project_config/index.ts:787:31
Type error: Type 'unknown' is not assignable to type 'Error | null'.
Type 'unknown' is not assignable to type 'Error'.
785 | newDatafileObj = configValidator.validateDatafile(config.datafile);
786 | } catch (error) {
787 | return { configObj: null, error };
788 | }
789 |
790 | if (config.jsonSchemaValidator) {

Steps to reproduce

Link to repository that can reproduce the issue: link
Replace {OPTIMIZELY_KEY} in pages/index.tsx

@optimizely/optimizely-sdk version: 4.9.0

node version: 14.18.0

npm version: 6.14.11

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions