'TypeError: Failed to load plugin 'jest' declared in '.eslintrc': Class extends value undefined is not a constructor or null

I was updating react-scripts to latest version i.e. 5.0.0 and started seeing above error. One article suggested to upgrade @typescript-eslint to version ^5.0.0 in order to be compatible with eslint version ^8.3.0 which comes by default by updating react-scripts to 5.0.0, which I did but error still exists. Please help as it is a critical issue as build is failing.



Solution 1:[1]

This is probably too late for the OP but I'm hoping this helps people like me who are looking for answers.

What worked for me was to update this library: eslint-plugin-jest to v26.x

I saw other people post saying that you need to update @typescript-eslint/eslint-plugin and @typescript-eslint/parser to v5.x, however that did not work for me (but wanted to include it in case it helps someone else)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 C.Kelly