React: eslint-plugin-react-hooks - breaks build

Created on 19 Mar 2019  路  1Comment  路  Source: facebook/react

After adding eslint-plugin-react-hooks eslint plugin to my project, it broke builds of the application in openshift. The app builds fine on local. Could it be caused by different node versions or something like that?

The error:

Module build failed (from ./node_modules/eslint-loader/index.js):
--
聽 | TypeError: Object.entries is not a function
聽 | at fastFindReferenceWithParent (/opt/app-root/src/node_modules/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js:1885:36)
聽 | at gatherDependenciesRecursively (/opt/app-root/src/node_modules/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js:1007:33)
聽 | at visitFunctionExpression (/opt/app-root/src/node_modules/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js:985:7)

Most helpful comment

Object.entries is supported since Node 7.
This ESLint plugin doesn't support earlier Node versions.

>All comments

Object.entries is supported since Node 7.
This ESLint plugin doesn't support earlier Node versions.

Was this page helpful?
0 / 5 - 0 ratings