question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Failed to load plugin 'react' declared in '--config': createRequire is not a function

See original GitHub issue

hi, i meet some trouble like the following, when i used the eslint to scan my local .jsx file for detail i used the command line as this : node /usr/share/node/bin/eslint -f json --output-file /home/admin/tesla-agent/.default/temp/tesla-agent/229431/.scannerwork/.sonartmp/16360860956120844706.tmp --config /home/admin/tesla-agent/.default/temp/tesla-agent/229431/.eslintrc /home/admin/tesla-agent/.default/temp/tesla-agent/229431/src/pages/IDQMaxDetailLayer.jsx

i have been installed react plugin but did not work. is it the bug or something please help me thank you so much

Oops! Something went wrong! :(

ESLint: 7.5.0

TypeError: Failed to load plugin 'react' declared in '--config': createRequire is not a function
Referenced from: /home/admin/tesla-agent/.default/temp/tesla-agent/229431/.eslintrc
    at Object.resolve (/usr/share/node/lib/node_modules/eslint/lib/shared/relative-module-resolver.js:28:20)
    at ConfigArrayFactory._loadPlugin (/usr/share/node/lib/node_modules/eslint/lib/cli-engine/config-array-factory.js:992:39)
    at ConfigArrayFactory._loadExtendedPluginConfig (/usr/share/node/lib/node_modules/eslint/lib/cli-engine/config-array-factory.js:812:29)
    at ConfigArrayFactory._loadExtends (/usr/share/node/lib/node_modules/eslint/lib/cli-engine/config-array-factory.js:761:29)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/usr/share/node/lib/node_modules/eslint/lib/cli-engine/config-array-factory.js:702:25)
    at _normalizeObjectConfigDataBody.next (<anonymous>)
    at ConfigArrayFactory._normalizeObjectConfigData (/usr/share/node/lib/node_modules/eslint/lib/cli-engine/config-array-factory.js:647:20)
    at _normalizeObjectConfigData.next (<anonymous>)
    at ConfigArrayFactory.loadFile (/usr/share/node/lib/node_modules/eslint/lib/cli-engine/config-array-factory.js:459:16)
    at createCLIConfigArray (/usr/share/node/lib/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js:160:35)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
aladdin-addcommented, Jul 31, 2020

it’s a breaking change in eslint v7.0.0. please consider upgrading node to required version: https://github.com/eslint/eslint/blob/16b10fe8ba3c78939d5ada4a25caf2f0c9e6a058/package.json#L144

2reactions
anikethsahacommented, Jul 30, 2020

Thanks for the report.

Can you share your node version?

also, output for --debug

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to solve Eslint - Module.createRequire is not a function ...
I'm trying to use ESLint but I get this error: ESLint: Initialization error (ESLint). Module.createRequire is not a function. versions: IDE: ...
Read more >
Error — ESLint TypeError createRequire is not a function | by ...
As of ESLint 7+ you need to be running Node 10.12.0 or higher. First get Node Version Manager (NVM) by running the following...
Read more >
eslint/eslint - Gitter
Error : Failed to load plugin 'vue' declared in 'PersonalConfig': Cannot find module 'eslint/lib/rules/array-bracket-spacing' Referenced from: ...
Read more >
Error: Failed to load plugin declared in '.eslintrc' : WEB-44691
In WebStorm preferences — manually configured ESLint with the path to the global ESLint package. Added "plugins": ["fp"] to the .eslint.rc file to...
Read more >
【VSCode异常处理】关于Failed to load plugin 'vue' declared ...
Syntax Error: TypeError: Failed to load plugin 'vue' declared in '.eslintrc.js': createRequire is not a function. Referenced from: D:\codeSource ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found