{"record":{"id":"1b62fb21c90dd18a","repo":"remotion-dev/remotion","slug":"unable-to-parse-eslint-version-eslintpackagever","errorCode":null,"errorMessage":"Unable to parse ESLint version: ${eslintPackageVersion}","messagePattern":"Unable to parse ESLint version: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/eslint-config/src/patch-eslint.ts","lineNumber":256,"sourceCode":"\t\t\t\t\t'Failed to patch ESLint because the calling module was not recognized.\\n' +\n\t\t\t\t\t\t'If you are using a newer ESLint version that may be unsupported, please create a GitHub issue:\\n' +\n\t\t\t\t\t\t'https://github.com/remotion-dev/remotion/issues',\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tcurrentModule = currentModule.parent;\n\t\t}\n\t}\n\n\t// Detect the ESLint package version\n\tconst eslintPackageJson = fs\n\t\t.readFileSync(path.join(eslintFolder, 'package.json'))\n\t\t.toString();\n\tconst eslintPackageObject = JSON.parse(eslintPackageJson);\n\tconst eslintPackageVersion = eslintPackageObject.version;\n\tconst versionMatch = /^([0-9]+)\\.([0-9]+)\\./.exec(eslintPackageVersion);\n\tif (!versionMatch) {\n\t\tthrow new Error('Unable to parse ESLint version: ' + eslintPackageVersion);\n\t}\n\n\tconst eslintMajorVersion = Number(versionMatch[1]);\n\tconst eslintMinorVersion = Number(versionMatch[2]);\n\tconst minEslintVersion = getMinEslintVersion();\n\tif (minEslintVersion !== null) {\n\t\tconst minVersionMatch = /^([0-9]+)\\.([0-9]+)\\./.exec(minEslintVersion)!;\n\t\tconst minMajorVersion = Number(minVersionMatch[1]);\n\t\tconst minMinorVersion = Number(minVersionMatch[2]);\n\t\tif (\n\t\t\teslintMajorVersion < minMajorVersion ||\n\t\t\t(eslintMajorVersion === minMajorVersion &&\n\t\t\t\teslintMinorVersion < minMinorVersion)\n\t\t) {\n\t\t\tthrow new Error(\n\t\t\t\t`Remotion 5 requires ESLint ${minEslintVersion} or later. You currently have ESLint ${eslintPackageVersion}.`,\n\t\t\t);\n\t\t}","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/eslint-config/src/patch-eslint.ts#L238-L274","documentation":"The ESLint patcher reads ESLint's `package.json` and extracts the version with the regex `^([0-9]+)\\.([0-9]+)\\.`. If the version string does not match (e.g., a non-standard format, a pre-release tag without a patch number, or a corrupted package.json), this error is thrown. The parsed version value is included in the message.","triggerScenarios":"A manually edited or corrupted ESLint `package.json` with a malformed `version` field, a forked ESLint with a non-semver version string, or an npm/pnpm issue that wrote an incomplete version.","commonSituations":"Using a forked or patched ESLint package, a corrupted `node_modules` after a failed install, or a custom ESLint build with an unconventional version.","solutions":["Reinstall ESLint cleanly: delete `node_modules/eslint` and reinstall.","Check ESLint's `package.json` version field is standard semver (e.g., `8.57.0`).","If using a forked ESLint, switch to the official package."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const eslintPkg = require('eslint/package.json');\nif (!/^\\d+\\.\\d+\\./.test(eslintPkg.version)) {\n  throw new Error(`ESLint package has an invalid version: ${eslintPkg.version}`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  require('@remotion/eslint-config/patch-eslint');\n} catch (err) {\n  if (err instanceof Error && err.message.includes('Unable to parse ESLint version')) {\n    // reinstall eslint to fix corrupted package.json\n    console.error('ESLint package.json corrupted. Reinstall node_modules/eslint.');\n  } else {\n    throw err;\n  }\n}","preventionTips":["Use official ESLint packages, not forks.","Reinstall node_modules if you suspect corruption.","Verify ESLint's package.json version field is valid semver."],"tags":["eslint","eslint-config","version-compat","corrupted-install"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}