I know it must be simple, but I cant figure out how to import ajv module with ajv-errors.
This is a standart import which works
import Ajv from 'ajv';
Down here the code from npmjs.com
which i don't understand, I use import, so how import and require supposed to be connected together?
const Ajv = require("ajv").default
const ajv = new Ajv({allErrors: true})
// Ajv option allErrors is required
require("ajv-errors")(ajv /*, {singleError: true} */)
And the last question: in this picture npmjs
where is the errorMessages at ajv instance ?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…