Skip to content
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

New error: "TypeError: confVer.split is not a function" #2056

Closed
apfelbox opened this issue Nov 26, 2018 · 4 comments
Closed

New error: "TypeError: confVer.split is not a function" #2056

apfelbox opened this issue Nov 26, 2018 · 4 comments

Comments

@apfelbox
Copy link

Hi,

suddenly I get this new error:

ERROR in ./assets/js/app/MyClass.js
Module build failed (from ./node_modules/eslint-loader/index.js):
TypeError: confVer.split is not a function
    at getReactVersionFromContext (/..project-dir../node_modules/eslint-plugin-react/lib/util/version.js:22:18)
    at Object.testReactVersion (/..project-dir../node_modules/eslint-plugin-react/lib/util/version.js:47:35)
    at CallExpression (/..project-dir../node_modules/eslint-plugin-react/lib/rules/no-render-return-value.js:40:25)
    at listeners.(anonymous function).forEach.listener (/..project-dir../node_modules/eslint/lib/util/safe-emitter.js:45:58)
    at Array.forEach (<anonymous>)
    at Object.emit (/..project-dir../node_modules/eslint/lib/util/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/..project-dir../node_modules/eslint/lib/util/node-event-generator.js:251:26)
    at NodeEventGenerator.applySelectors (/..project-dir../node_modules/eslint/lib/util/node-event-generator.js:280:22)
    at NodeEventGenerator.enterNode (/..project-dir../node_modules/eslint/lib/util/node-event-generator.js:294:14)
    at CodePathAnalyzer.enterNode (/..project-dir../node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:632:23)
    at nodeQueue.forEach.traversalInfo (/..project-dir../node_modules/eslint/lib/linter.js:860:28)
    at Array.forEach (<anonymous>)
    at runRules (/..project-dir../node_modules/eslint/lib/linter.js:856:15)
    at Linter._verifyWithoutProcessors (/..project-dir../node_modules/eslint/lib/linter.js:1001:31)
    at preprocess.map.textBlock (/..project-dir../node_modules/eslint/lib/linter.js:1052:35)
    at Array.map (<anonymous>)
 @ ./assets/js/app.js 2:0-44 5:30-41

I am using the following versions:

node.js 11.2.0
macOS 10.14.1

babel-eslint@10.0.1
eslint@5.9.0
eslint-loader@2.1.1
eslint-plugin-react@7.11.1

I am trying to lint Preact code with the plugin which previously worked.

@alexzherdev
Copy link
Contributor

Could you post your eslint config?

@alexzherdev
Copy link
Contributor

Not sure how it worked before, but react version in the config is supposed to be a string, i.e. "15.0".

@ljharb ljharb closed this as completed in 6d9e7bb Nov 26, 2018
@apfelbox
Copy link
Author

apfelbox commented Nov 26, 2018

Hmm, maybe I just didn’t lint after adding the version constraint.. not sure anymore.

Meanwhile I am so used to not quoting strings in YAML, that I now accidentally produced a number 😅

Thanks for the hint though, your great work and the improved error message. 🙌

This was referenced Dec 28, 2018
This was referenced Jan 4, 2019
@ghost ghost mentioned this issue Jan 12, 2019
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants