Skip to content

AssertionError [ERR_ASSERTION] with v3 to v4 #833

Description

@MariaAga

Thanks for making a code mod for v3 🙏
I was trying to use it on our repo (foreman), by running: npx @patternfly/pf-codemods@latest webpack/ --v4
and I got this error:

node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

AssertionError [ERR_ASSERTION]: Node must be provided when reporting error if location is not provided
    at assertValidNodeInfo (~/.npm/_npx/76864/lib/node_modules/@patternfly/pf-codemods/node_modules/eslint/lib/linter/report-translator.js:83:9)
    at ~/.npm/_npx/76864/lib/node_modules/@patternfly/pf-codemods/node_modules/eslint/lib/linter/report-translator.js:333:9
    at Object.report (~/.npm/_npx/76864/lib/node_modules/@patternfly/pf-codemods/node_modules/eslint/lib/linter/linter.js:1047:41)
    at Object.create (~/.npm/_npx/76864/lib/node_modules/@patternfly/pf-codemods/node_modules/@patternfly/eslint-plugin-pf-codemods/lib/rules/v4/chart-remove-allowZoom.js:18:15)
    at createRuleListeners (~/.npm/_npx/76864/lib/node_modules/@patternfly/pf-codemods/node_modules/eslint/lib/linter/linter.js:895:21)
    at ~/.npm/_npx/76864/lib/node_modules/@patternfly/pf-codemods/node_modules/eslint/lib/linter/linter.js:1066:110
    at Array.forEach (<anonymous>)
    at runRules (~/.npm/_npx/76864/lib/node_modules/@patternfly/pf-codemods/node_modules/eslint/lib/linter/linter.js:1003:34)
    at Linter._verifyWithoutProcessors (~/.npm/_npx/76864/lib/node_modules/@patternfly/pf-codemods/node_modules/eslint/lib/linter/linter.js:1355:31)
    at Linter._verifyWithConfigArray (~/.npm/_npx/76864/lib/node_modules/@patternfly/pf-codemods/node_modules/eslint/lib/linter/linter.js:1807:21) {
  generatedMessage: false,
  code: 'ERR_ASSERTION',
  actual: undefined,
  expected: true,
  operator: '=='
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions