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

Cannot find module "array-includes" (using v4) #38

Open
wvbe opened this issue Sep 27, 2024 · 0 comments
Open

Cannot find module "array-includes" (using v4) #38

wvbe opened this issue Sep 27, 2024 · 0 comments

Comments

@wvbe
Copy link

wvbe commented Sep 27, 2024

When installing [email protected] and running ESLint I get the following error:

Error: Cannot find module 'array-includes'
Require stack:
- /Users/wybe/Tools/eslint-config/node_modules/eslint-plugin-canonical/dist/src/rules/ExportMap.js
- /Users/wybe/Tools/eslint-config/node_modules/eslint-plugin-canonical/dist/src/rules/noBarrelImport.js
- /Users/wybe/Tools/eslint-config/node_modules/eslint-plugin-canonical/dist/src/index.js

File ExportMap does indeed import array-includes, but array-includes is not depended on in package.json. Instead, canonical relies on a transitive dependency, as package-lock.json shows.

This is of course prone to break and, in my specific case of other ESLint version, plugins and dependencies, broke indeed.

The fix would be to include every library that eslint-plugin-canonical imports directly as a dependency in package.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant