{"record":{"id":"e779a208f74825d5","repo":"remotion-dev/remotion","slug":"failed-to-patch-eslint-because-the-calling-module","errorCode":null,"errorMessage":"Failed to patch ESLint because the calling module was not recognized.\nIf you are using a newer ESLint version that may be unsupported, please create a GitHub issue:\nhttps://github.com/remotion-dev/remotion/issues","messagePattern":"Failed to patch ESLint because the calling module was not recognized\\.\nIf you are using a newer ESLint version that may be unsupported, please create a GitHub issue:\nhttps://github\\.com/remotion-dev/remotion/issues","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/eslint-config/src/patch-eslint.ts","lineNumber":237,"sourceCode":"\t\t\t\t/[\\\\/]eslint[\\\\/]lib[\\\\/]cli-engine[\\\\/]config-array-factory\\.js$/i.test(\n\t\t\t\t\tcurrentModule.filename,\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\teslintFolder = path.join(path.dirname(currentModule.filename), '../..');\n\t\t\t\tconfigArrayFactoryPath = path.join(\n\t\t\t\t\teslintFolder,\n\t\t\t\t\t'lib/cli-engine/config-array-factory',\n\t\t\t\t);\n\t\t\t\tmoduleResolverPath = path.join(\n\t\t\t\t\teslintFolder,\n\t\t\t\t\t'lib/shared/relative-module-resolver',\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (!currentModule.parent) {\n\t\t\t\t// This was tested with ESLint 6.1.0 .. 7.12.1.\n\t\t\t\tthrow new Error(\n\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) {","sourceCodeStart":219,"sourceCodeEnd":255,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/eslint-config/src/patch-eslint.ts#L219-L255","documentation":"The `@remotion/eslint-config` package patches ESLint's internal module resolution to fix plugin lookup (a workaround for eslint/eslint#3458). The patcher walks up the Node.js `require` stack to locate the calling ESLint module. If it reaches the top of the module tree without recognizing any module as belonging to ESLint, it throws this error. This means the installed ESLint version has an internal layout the patcher does not recognize.","triggerScenarios":"Installing an ESLint version newer than what the patcher supports (currently tested for 6.x–9.x), using a bundled/packaged ESLint whose internal file paths differ, or loading ESLint from a non-standard location (e.g., webpack-bundled).","commonSituations":"Upgrading ESLint to a new major version before Remotion adds support, using a monorepo with an unusual ESLint hoisting setup, or running ESLint through a custom runner that obscures the module stack.","solutions":["Pin ESLint to a version in the 6.x–9.x range that Remotion supports.","Upgrade `@remotion/eslint-config` to the latest version which may support newer ESLint.","If on a supported version, report the issue to Remotion with the ESLint version and call stack."],"exampleFix":"// before\n\"devDependencies\": { \"eslint\": \"^10.0.0\" } // unsupported\n\n// after\n\"devDependencies\": { \"eslint\": \"^9.0.0\" } // supported","handlingStrategy":"validation","validationCode":"// Verify ESLint version before the patch runs\nconst eslintVersion = require('eslint/package.json').version;\nconst major = Number(eslintVersion.split('.')[0]);\nif (major < 6 || major > 9) {\n  throw new Error(`Unsupported ESLint version ${eslintVersion}. Use 6.x–9.x.`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  require('@remotion/eslint-config/patch-eslint');\n} catch (err) {\n  if (err instanceof Error && err.message.includes('calling module was not recognized')) {\n    // pin ESLint to a supported version\n    console.error('ESLint version not recognized. Pin to 6.x–9.x.');\n  } else {\n    throw err;\n  }\n}","preventionTips":["Pin ESLint to a major version in the 6–9 range.","Keep @remotion/eslint-config updated to the latest release.","Check Remotion release notes for newly supported ESLint versions."],"tags":["eslint","eslint-config","version-compat","module-resolution"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}