Skip to content

eslint-config-react-app is not compatible with ESLint 8 #11549

Open
@kirill-konshin

Description

@kirill-konshin

Describe the bug

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/rules/no-unused-expressions' is not defined by "exports" in /xxx/node_modules/eslint/package.json
    at throwExportsNotFound (internal/modules/esm/resolve.js:290:9)
    at packageExportsResolve (internal/modules/esm/resolve.js:513:3)
    at resolveExports (internal/modules/cjs/loader.js:437:36)
    at Function.Module._findPath (internal/modules/cjs/loader.js:477:31)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:872:27)
    at Function.Module._load (internal/modules/cjs/loader.js:730:27)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (/xxx/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/xxx/node_modules/eslint-plugin-flowtype/dist/rules/noUnusedExpressions.js:8:51)
    at Module._compile (/xxx/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)

Looks like eslint-plugin-flowtype/dist/rules/noUnusedExpressions.js imports file that's not exported explicitly.

Environment

Eslint 8.0.0
eslint-plugin-flowtype: 6.1.0
eslint-config-react-app: 6.0.0

Expected behavior

No errors

Actual behavior

Error from the above

Reproducible demo

Clone https://github.com/ringcentral/ringcentral-javascript/tree/eslint8 (branch eslint8)

yarn install
yarn test

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions