Skip to content

Restore caniuse as dependency#682

Open
jnoordsij wants to merge 1 commit intoamilajack:mainfrom
jnoordsij:restore-caniuse-dependency
Open

Restore caniuse as dependency#682
jnoordsij wants to merge 1 commit intoamilajack:mainfrom
jnoordsij:restore-caniuse-dependency

Conversation

@jnoordsij
Copy link

In cebfaee this dependency was dropped.
However, it is still referenced in the code, and therefore should be declared explicitly.
In particular, not declaring it will make Yarn PnP fail with the error:

Error: eslint-plugin-compat tried to access caniuse-lite, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

@TomiBelan
Copy link

+1. Besides Yarn PnP, this also affects pnpm configured with hoist: true.

Error: Cannot find module 'caniuse-lite'
Require stack:
- /home/tomi/[project]/node_modules/.pnpm/eslint-plugin-compat@7.0.1_eslint@10.0.3/node_modules/eslint-plugin-compat/lib/esm/src/providers/caniuse-provider.js

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

Successfully merging this pull request may close these issues.

2 participants