bazel-examples
bazel-examples copied to clipboard
[Bug]: Module @typescript-eslint/eslint-plugin not found for react-cra
What happened?
I checked bazel-examples
out, then went to react-cra
and ran
bazelisk run //:start
I got following output:
Failed to compile.
[eslint] Failed to load plugin '@typescript-eslint' declared in '../../../../../.eslintrc.json': Cannot find module '@typescript-eslint/eslint-plugin'
Require stack:
- /private/var/tmp/_bazel_tfr/6292325368335b9676478ec234af8bd0/execroot/__main__/.eslintrc.json
Referenced from: /private/var/tmp/_bazel_tfr/6292325368335b9676478ec234af8bd0/execroot/__main__/.eslintrc.json
ERROR in [eslint] Failed to load plugin '@typescript-eslint' declared in '../../../../../.eslintrc.json': Cannot find module '@typescript-eslint/eslint-plugin'
Require stack:
- /private/var/tmp/_bazel_tfr/6292325368335b9676478ec234af8bd0/execroot/__main__/.eslintrc.json
Referenced from: /private/var/tmp/_bazel_tfr/6292325368335b9676478ec234af8bd0/execroot/__main__/.eslintrc.json
webpack compiled with 1 error
No issues found.
The webserver was accessible and otherwise worked the way I would have expected. That is, this error showed nicely up in the browser.
Version
Development (host) and target OS/architectures:
% uname -a
Darwin mac86.local 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64 x86_64
commit e526c12155c309a18c5484216896c1b74fce8fca (HEAD -> main, origin/main, origin/HEAD)
Author: Jason Bedard <[email protected]>
Date: Mon Nov 7 13:37:55 2022 -0800
fix: enable ngc JIT mode for angular-ngc unit tests (#134)
Fixes #111
I used bazelisk and tried with both 5.2.0 and 6.0.0-rc1
Version of the Aspect rules, or other relevant rules from your
WORKSPACE
or MODULE.bazel
file:
Language(s) and/or frameworks involved:
How to reproduce
git clone https://github.com/aspect-build/bazel-examples.git
cd bazel-examples/react-cra
bazelisk run //:start
Any other information?
No response
Fund our work
- [ ] Sponsor our open source work by donating a bug bounty
I've just tested this bug on a Mac Studio and an Intel NUC with Ubuntu 22. The issue reproduces on macOS but not on Ubuntu where everything works fine.
https://github.com/aspect-build/bazel-examples/blob/main/react-cra/package.json#L51 ought to fix this.
The example is moving to https://github.com/bazelbuild/examples/tree/main/frontend and I'm fighting with a few errors just like this one. That repo does have macos CI testing so I think this should naturally be resolved during the move. Please open another issue over there if this is still broken for you.