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

TypeError on 2.17.0 #1322

Closed
mlenser opened this issue Apr 13, 2019 · 15 comments
Closed

TypeError on 2.17.0 #1322

mlenser opened this issue Apr 13, 2019 · 15 comments

Comments

@mlenser
Copy link

mlenser commented Apr 13, 2019

I receive the following error while running eslint based on airbnb on a long-standing project after updating to 2.17.0.

TypeError: (0 , _ignore.getFileExtensions) is not a function
at checkSourceValue (node_modules\eslint-plugin-import\lib\rules\no-useless-path-segments.js:103:60)
at checkSourceValue (node_modules\eslint-module-utils\moduleVisitor.js:29:5)
at checkSource (node_modules\eslint-module-utils\moduleVisitor.js:34:5)
at listeners.(anonymous function).forEach.listener (node_modules\eslint\lib\util\safe-emitter.js:45:58)
at Array.forEach (<anonymous>)
at Object.emit (node_modules\eslint\lib\util\safe-emitter.js:45:38)
at NodeEventGenerator.applySelector (node_modules\eslint\lib\util\node-event-generator.js:251:26)
at NodeEventGenerator.applySelectors (node_modules\eslint\lib\util\node-event-generator.js:280:22)
at NodeEventGenerator.enterNode (node_modules\eslint\lib\util\node-event-generator.js:294:14)
at CodePathAnalyzer.enterNode (node_modules\eslint\lib\code-path-analysis\code-path-analyzer.js:632:23)

using

"eslint": "5.12.0",
"eslint-config-airbnb": "17.1.0",

Perhaps I have some mistake on my end? If more details are needed please let me know,

@fisker
Copy link
Contributor

fisker commented Apr 13, 2019

I has the same issue, I believe problem is because package eslint-module-utils is not updated, please fix this

@lalau
Copy link

lalau commented Apr 13, 2019

Same happen to me. Looks like a new version of eslint-module-utils needs to be published.

@jeremykhon
Copy link

I had the same issue

@jaeminkim87
Copy link

There is no "exports.getFileExtensions = makeValidExtensionSet" in eslint-module-utils/ ignore.js v2.17.0

Fix please

ps. I do not understand. There is "exports.getFileExtensions = makeValidExtensionSet" in github source, but there is no "exports.getFileExtensions = makeValidExtensionSet" in release source.

@RosenTomov
Copy link

Same problem

// replaced path with ~ for better readability

Error: Module build failed (from ./node_modules/eslint-loader/index.js):
TypeError: (0 , _ignore.getFileExtensions) is not a function
Occurred while linting ~\src\index.js:1
    at checkSourceValue (~\node_modules\eslint-plugin-import\lib\rules\no-useless-path-segments.js:103:60)
    at checkSourceValue (~\node_modules\eslint-module-utils\moduleVisitor.js:29:5)
    at checkSource (~\node_modules\eslint-module-utils\moduleVisitor.js:34:5)
    at listeners.(anonymous function).forEach.listener (~\node_modules\eslint\lib\util\safe-emitter.js:45:58)
    at Array.forEach (<anonymous>)
    at Object.emit (~\node_modules\eslint\lib\util\safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (~\node_modules\eslint\lib\util\node-event-generator.js:251:26)
    at NodeEventGenerator.applySelectors (~\node_modules\eslint\lib\util\node-event-generator.js:280:22)
    at NodeEventGenerator.enterNode (~\node_modules\eslint\lib\util\node-event-generator.js:294:14)
    at CodePathAnalyzer.enterNode (~\node_modules\eslint\lib\code-path-analysis\code-path-analyzer.js:632:23)
    at nodeQueue.forEach.traversalInfo (~\node_modules\eslint\lib\linter.js:752:32)
    at Array.forEach (<anonymous>)
    at runRules (~\node_modules\eslint\lib\linter.js:747:15)
    at Linter._verifyWithoutProcessors (~\node_modules\eslint\lib\linter.js:899:31)
    at preprocess.map.textBlock (~\node_modules\eslint\lib\linter.js:955:35)
    at Array.map (<anonymous>)

Luis729 added a commit to NGCP/GCS that referenced this issue Apr 13, 2019
`eslint-plugin-import` causes TypeError issues

import-js/eslint-plugin-import#1322
@ghost
Copy link

ghost commented Apr 13, 2019

For now, downgrading to 2.16.0 of eslint-plugin-import fixes the issue for me.

@ljharb
Copy link
Member

ljharb commented Apr 13, 2019

Thanks, I’ll update eslint-module-utils shortly.

@ljharb
Copy link
Member

ljharb commented Apr 13, 2019

v2.4.0 of es-module-utils is published; i'll also publish v2.17.1 of eslint-plugin-import to bump the dep requirement.

@smorimoto
Copy link

Cool, thanks.

@fisker
Copy link
Contributor

fisker commented Apr 13, 2019

eta?

@ljharb
Copy link
Member

ljharb commented Apr 13, 2019

@fisker unless your lockfile is keeping you broken, all you have to do is rimraf and reinstall node_modules and everything is already fixed. If you have a lockfile, make sure to update the transitive eslint-module-utils dep.

@mistic100
Copy link

mistic100 commented Apr 13, 2019

Actually it looks like there is a (huge) delay in the version deployment on NPM network.
https://www.npmjs.com/package/eslint-plugin-import
Depending in your region 2.17.1 might not be available yet

@ljharb
Copy link
Member

ljharb commented Apr 13, 2019

It hasn’t been published yet, so it’s not available for anyone - but you don’t need that patch version of the parent package to fix this issue.

@ljharb
Copy link
Member

ljharb commented Apr 13, 2019

v2.17.1 is now published.

@fisker
Copy link
Contributor

fisker commented Apr 13, 2019

thanks, works now.

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

9 participants