microsoft/rushstack

[eslint-patch] Error: Failed to patch ESLint because the calling module was not recognized.

weyert opened this issue · 3 comments

Summary

An error is thrown when trying to use @rushstack/eslint-patch version 1.6.1 together with the latest version of eslint 8.56.0

Repro steps

Expected result:
Successful running of ESLint

Actual result:

Error: Failed to patch ESLint because the calling module was not recognized.
If you are using a newer ESLint version that may be unsupported, please create a GitHub issue:
https://github.com/microsoft/rushstack/issues
    at Object.<anonymous> (/Users/x/Development/Projects/y/monorepo/node_modules/.pnpm/@rushstack+eslint-patch@1.6.1/node_modules/@rushstack/eslint-patch/lib/_patch-base.js:165:19)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (/Users/x/Development/Projects/y/monorepo/node_modules/.pnpm/@rushstack+eslint-patch@1.6.1/node_modules/@rushstack/eslint-patch/lib/modern-module-resolution.js:11:23)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
 ELIFECYCLE  Command failed with exit code 1.
 ELIFECYCLE  Test failed. See above for more details.

Details

The latest version of ESLint appears to throw an error by the eslint-patch-package

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@rushstack/eslint-config version? Not used
Operating system? Mac
Would you consider contributing a PR? Yes
TypeScript compiler version? 5.2.2
Node.js version (node -v)? 20.10.0

@D4N14L - want to take a look?

This reminded me. I just tried it with the new v1.7.0 version and it appears to work

I'll close this out then. Feel free to open a new bug if you hit any further issues