When using Yarn in PnP mode (the default) as the package manager, trying the documented run command
npx @eslint/config-inspector@latest
fails with an error message along the lines of the following:
(also note that it always says eslint.config.js, even if it's actually e.g. eslint.config.mjs)
Failed to load `eslint.config.js`.
https://eslint.org/docs/latest/use/configure/configuration-files-new
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'globals' imported from C:\config-inspector-test\eslint.config.bundled_dso4w158dx.mjs
at new NodeError (node:internal/errors:406:5)
at moduleResolve (node:internal/modules/esm/resolve:838:20)
at defaultResolve (node:internal/modules/esm/resolve:1043:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:228:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
at link (node:internal/modules/esm/module_job:84:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
because npx has no idea how to resolve Yarn packages.
The way to successfully run it with Yarn would be
yarn add -D @eslint/config-inspector
and then
yarn run config-inspector
which would be a helpful addition to the usage section of the README.
When using Yarn in PnP mode (the default) as the package manager, trying the documented run command
fails with an error message along the lines of the following:
(also note that it always says
eslint.config.js, even if it's actually e.g.eslint.config.mjs)because
npxhas no idea how to resolve Yarn packages.The way to successfully run it with Yarn would be
and then
which would be a helpful addition to the usage section of the README.