Eslint-plugin-import: TypeError on 2.17.0

Created on 13 Apr 2019  路  15Comments  路  Source: benmosher/eslint-plugin-import

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,

Most helpful comment

v2.17.1 is now published.

All 15 comments

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

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

I had the same issue

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.

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>)

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

Thanks, I鈥檒l update eslint-module-utils shortly.

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.

Cool, thanks.

eta?

@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.

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

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

v2.17.1 is now published.

thanks, works now.

Was this page helpful?
0 / 5 - 0 ratings