-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[Bug]: TypeError: Error while loading rule 'react/prefer-stateless-function': [[GeneratorState]] is not present on O #3627
Comments
Duplicate of #3624. Root cause: es-shims/iterator-helpers#4 |
In the case of #3624, it was caused by yarn dependency resolution bugs. What package manager cli are you using? |
I'm using yarn V1.22.19. |
In that case, I suspect a yarn resolution bug - ^1.0.5 of es-iterator-helpers is required, but somehow v1.0.3 gets installed. Does that match your node_modules? |
No, I got V1.0.14 installed. It looks ok. |
oh sorry, i meant internal-slot :-) |
You are absolutely right, thanks a lot. |
Ran into this problem as well, with yarn berry, running |
A smart way to fixed this problem. |
* Bump the npm group with 10 updates Bumps the npm group with 10 updates: | Package | From | To | | --- | --- | --- | | [@babel/cli](https://github.com/babel/babel/tree/HEAD/packages/babel-cli) | `7.23.0` | `7.23.4` | | [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) | `7.23.0` | `7.23.3` | | [@babel/eslint-parser](https://github.com/babel/babel/tree/HEAD/eslint/babel-eslint-parser) | `7.22.15` | `7.23.3` | | [@babel/plugin-syntax-jsx](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-syntax-jsx) | `7.22.5` | `7.23.3` | | [@babel/plugin-transform-modules-commonjs](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-modules-commonjs) | `7.23.0` | `7.23.3` | | [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) | `7.22.20` | `7.23.3` | | [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) | `2.28.1` | `2.29.0` | | [eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y) | `6.7.1` | `6.8.0` | | [prettier](https://github.com/prettier/prettier) | `3.0.3` | `3.1.0` | | [puppeteer](https://github.com/puppeteer/puppeteer) | `21.3.6` | `21.5.2` | Updates `@babel/cli` from 7.23.0 to 7.23.4 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.4/packages/babel-cli) Updates `@babel/core` from 7.23.0 to 7.23.3 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.3/packages/babel-core) Updates `@babel/eslint-parser` from 7.22.15 to 7.23.3 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.3/eslint/babel-eslint-parser) Updates `@babel/plugin-syntax-jsx` from 7.22.5 to 7.23.3 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.3/packages/babel-plugin-syntax-jsx) Updates `@babel/plugin-transform-modules-commonjs` from 7.23.0 to 7.23.3 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.3/packages/babel-plugin-transform-modules-commonjs) Updates `@babel/preset-env` from 7.22.20 to 7.23.3 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.3/packages/babel-preset-env) Updates `eslint-plugin-import` from 2.28.1 to 2.29.0 - [Release notes](https://github.com/import-js/eslint-plugin-import/releases) - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md) - [Commits](import-js/eslint-plugin-import@v2.28.1...v2.29.0) Updates `eslint-plugin-jsx-a11y` from 6.7.1 to 6.8.0 - [Release notes](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/releases) - [Changelog](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/CHANGELOG.md) - [Commits](jsx-eslint/eslint-plugin-jsx-a11y@v6.7.1...v6.8.0) Updates `prettier` from 3.0.3 to 3.1.0 - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](prettier/prettier@3.0.3...3.1.0) Updates `puppeteer` from 21.3.6 to 21.5.2 - [Release notes](https://github.com/puppeteer/puppeteer/releases) - [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json) - [Commits](puppeteer/puppeteer@puppeteer-v21.3.6...puppeteer-v21.5.2) --- updated-dependencies: - dependency-name: "@babel/cli" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm - dependency-name: "@babel/core" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm - dependency-name: "@babel/eslint-parser" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm - dependency-name: "@babel/plugin-syntax-jsx" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm - dependency-name: "@babel/plugin-transform-modules-commonjs" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm - dependency-name: "@babel/preset-env" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm - dependency-name: eslint-plugin-import dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm - dependency-name: eslint-plugin-jsx-a11y dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm - dependency-name: puppeteer dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm ... Signed-off-by: dependabot[bot] <support@github.com> * Fix issues as reported in jsx-eslint/eslint-plugin-react#3627 with yarn-deduplicate * Fix linting --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marius Kleidl <marius@transloadit.com>
Is there an existing issue for this?
Description Overview
When I executed
eslint src --ext js jsx ts tsx
, the teminal throw out the 'react/prefer-stateless-function' errorESLint: 8.21.0
TypeError: Error while loading rule 'react/prefer-stateless-function':
[[GeneratorState]]
is not present onO
eslint src --ext js jsx ts tsx
Expected Behavior
I found out that there is no problem when I use v7.32.1 , hope fix this problem
eslint-plugin-react version
v7.32.2
eslint version
8.21.0
node version
16.14.0
The text was updated successfully, but these errors were encountered: