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
The last statement in the following code block contains the require that is causing the issue. It could be fixed by adding an import statement and than assigning that value to the ajv.addMetaSchema() calll.
The generated file:
// generated by typescript-json-validator
import {inspect} from 'util';
import Ajv = require('ajv');
import ourReportfrom './ourReport';
export const ajv = new ajv({"allErrors":true,"coerceTypes":false,"format":"fast","nullable":true,"unicode":true,"uniqueItems":true,"useDefaults":true});
ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json'));
update:
The following error doesn't like the node_modeuls so the fix doesn't work. Not sure how to fix this yet.
TS6059: File ' _PACKAGE_PATH_\node_modules\ajv\lib\refs\json-schema-draft-06.json' is not under 'rootDir' ' _PACKAGE_PATH_/src'. 'rootDir' is expected to contain all source files.
The last statement in the following code block contains the
require
that is causing the issue. It could be fixed by adding animport
statement and than assigning that value to theajv.addMetaSchema()
calll.The generated file:
update:
The following error doesn't like the node_modeuls so the fix doesn't work. Not sure how to fix this yet.
update:
Temp work-around ->
/* eslint-disable @typescript-eslint/no-var-requires */
The text was updated successfully, but these errors were encountered: