You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constajv_1=require("ajv");if(options.schema){if(typeofoptions.schema!=='object'){thrownewTypeError('The `schema` option must be an object.');}constajv=newajv_1.default({// problem from hereallErrors: true,useDefaults: true});constschema={type: 'object',properties: options.schema};__classPrivateFieldSet(this,_validator,ajv.compile(schema));for(const[key,value]ofObject.entries(options.schema)){if(value===null||value===void0 ? void0 : value.default){__classPrivateFieldGet(this,_defaultValues)[key]=value.default;}}}
it add .default after require ajv from node_modules but when ajv export, it didn't use any default key as screenshot below
So now it throw TypeError: ajv_1.default is not a constructor error.
P.S I use this via electron-store library
Version
conf: version 9.0.0 os: Macos version 11.1 (20C69) Big Sur node: v15.5.1 yarn: v1.22.10
The text was updated successfully, but these errors were encountered:
Problem
The generated code on schema section is below
it add
.default
after require ajv from node_modules but when ajv export, it didn't use any default key as screenshot belowSo now it throw
TypeError: ajv_1.default is not a constructor
error.P.S I use this via
electron-store
libraryVersion
conf: version
9.0.0
os: Macos version
11.1 (20C69)
Big Surnode:
v15.5.1
yarn:
v1.22.10
The text was updated successfully, but these errors were encountered: