diff --git a/lib/definitions/errors.js b/lib/definitions/errors.js index fccea7a5..7df6336a 100644 --- a/lib/definitions/errors.js +++ b/lib/definitions/errors.js @@ -1,6 +1,8 @@ import {inspect} from 'util'; -import pkg from '../../package.json' assert {type: 'json'}; +import { createRequire } from "node:module"; +const require = createRequire(import.meta.url); +const pkg = require("../../package.json"); const [homepage] = pkg.homepage.split('#'); const linkify = (file) => `${homepage}/blob/master/${file}`; const stringify = (object) => inspect(object, {breakLength: Number.POSITIVE_INFINITY, depth: 2, maxArrayLength: 5});