eslint-plugin-import-x: `Error: Cannot find module '../package.json'`
Issue
After upgrading from 4.9.1 to >= 4.10.0, I’m getting the following error in our webpack builds:
Replication Steps
OS: I’m using Mac OS 14.2 running on Apple Silicon. This appears to not occur on Windows. Our GitHub Actions fail for this as well which is running on ubuntu-latest
- Clone repo: https://github.com/gitkraken/vscode-gitlens
- Upgrade
eslint-plugin-import-xto4.10.0or higher - Install deps:
pnpm i - Run build:
pnpm run build
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (10 by maintainers)
Commits related to this issue
- fix: suppprt run with `node --eval` close #296 — committed to un-ts/eslint-plugin-import-x by JounQin 2 years ago
- fix: suppprt run with worker eval close #296 — committed to un-ts/eslint-plugin-import-x by JounQin 2 years ago
- chore: add `EVAL_FILENAMES` for reusing related https://github.com/un-ts/eslint-plugin-import-x/issues/296 — committed to un-ts/pkgr by JounQin 2 years ago
@JounQin Thank you so much!!!
Thank you!!!
https://github.com/gitkraken/vscode-gitlens/pull/4236
@d13 @eamodio It should work now.
@eamodio 4.9 -> 4.10 changes from pure commonjs to ESM as primary but commonjs is still supported. So it’s a minor change, and shouldn’t break normal eslint usage, but
eslint-lite-webpack-pluginseems special.I can consistently reproduce it on https://GitPod.io, you can try it with https://gitpod.io/?autostart=true#https://github.com/JounQin/vscode-gitlens/tree/chore/bump