Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use latest version with Yarn PnP in strict mode #1284

Closed
marvinruder opened this issue Jul 30, 2024 · 2 comments · Fixed by #1285 · May be fixed by AKJUS/node#19
Closed

Unable to use latest version with Yarn PnP in strict mode #1284

marvinruder opened this issue Jul 30, 2024 · 2 comments · Fixed by #1285 · May be fixed by AKJUS/node#19

Comments

@marvinruder
Copy link

Expected behavior

ESLint succeeds without errors.

Actual behavior

ESLint fails with:

Oops! Something went wrong! :(

ESLint: 8.57.0

Error: Failed to load plugin 'jsdoc' declared in '.eslintrc.json': eslint-plugin-jsdoc tried to access espree, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: espree
Required by: eslint-plugin-jsdoc@virtual:9e2d75c26d812ba07f2548643e31c2f0eb2cb6f6eca268f33f7e7f2f00bc9a60e5174f4187df59beb0c43929d43a06842c0155865f0f7f541c96499f2ed6aada#npm:48.9.3 (via /…/eslint-plugin-jsdoc-npm-48.9.3-8f2d22eed0-10c0.zip/node_modules/eslint-plugin-jsdoc/dist/)

Require stack:
- /…/eslint-plugin-jsdoc-npm-48.9.3-8f2d22eed0-10c0.zip/node_modules/eslint-plugin-jsdoc/dist/getJsdocProcessorPlugin.cjs
- /…/eslint-plugin-jsdoc-npm-48.9.3-8f2d22eed0-10c0.zip/node_modules/eslint-plugin-jsdoc/dist/index.cjs
- /…/@eslint-eslintrc-npm-2.1.4-1ff4b5f908-10c0.zip/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
Referenced from: /…/packages/backend/.eslintrc.json
    at require$$0.Module._resolveFilename (/…/.pnp.cjs:16695:13)
    at Module._load (node:internal/modules/cjs/loader:1045:27)
    at require$$0.Module._load (/…/.pnp.cjs:16586:31)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:215:24)
    at Module.require (node:internal/modules/cjs/loader:1304:12)
    at require (node:internal/modules/helpers:123:16)
    at Object.<anonymous> (/…/eslint-plugin-jsdoc-npm-48.9.3-8f2d22eed0-10c0.zip/node_modules/eslint-plugin-jsdoc/dist/getJsdocProcessorPlugin.cjs:10:38)
    at Module._compile (node:internal/modules/cjs/loader:1504:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1588:10)

This is likely caused by 3ba475e (as espree is imported in src/getJsdocProcessorPlugin.js) and can be fixed by moving espree from devDependencies to dependencies.

ESLint Config

// N/A

ESLint sample

// N/A

Environment

  • Node version: 22.5.1
  • ESLint version 8.57.0
  • eslint-plugin-jsdoc version: 48.9.3
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Jul 30, 2024
Copy link

🎉 This issue has been resolved in version 48.10.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@brettz9
Copy link
Collaborator

brettz9 commented Jul 30, 2024

Thanks for the report!

This was referenced Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment