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

Outstanding ESlint Warning: Babel Error reported by eslint-import-resolver-babel-module #258

Closed
thedavidprice opened this issue Mar 15, 2020 · 0 comments · Fixed by #262
Closed

Comments

@thedavidprice
Copy link
Contributor

Running yarn lint results in the warning below (repeated about 10x).

The warning behavior is explained here:
tleunen/eslint-import-resolver-babel-module#34

Effectively eslint-import-resolver-babel-module (which is wrapping Babel) is letting us know that Bable reported an error. In our case the error is:
TypeError: Cannot read property 'plugins' of null

At this time, I've not yet been able to determine if this is a problem with either:

  • our babel config in packages/core/config/babel-preset.js, or
  • a separate babel plugin (or module) we are using
[eslint-import-resolver-babel-module] TypeError: Cannot read property 'plugins' of null
    at getPlugins (/Users/price/Repos/redwoodjs-redwood/node_modules/eslint-import-resolver-babel-module/lib/index.js:23:19)
    at getPluginOptions (/Users/price/Repos/redwoodjs-redwood/node_modules/eslint-import-resolver-babel-module/lib/index.js:35:21)
    at Object.exports.resolve (/Users/price/Repos/redwoodjs-redwood/node_modules/eslint-import-resolver-babel-module/lib/index.js:94:27)
    at v2 (/Users/price/Repos/redwoodjs-redwood/node_modules/eslint-module-utils/resolve.js:117:23)
    at withResolver (/Users/price/Repos/redwoodjs-redwood/node_modules/eslint-module-utils/resolve.js:122:16)
    at fullResolve (/Users/price/Repos/redwoodjs-redwood/node_modules/eslint-module-utils/resolve.js:139:22)
    at relative (/Users/price/Repos/redwoodjs-redwood/node_modules/eslint-module-utils/resolve.js:84:10)
    at resolve (/Users/price/Repos/redwoodjs-redwood/node_modules/eslint-module-utils/resolve.js:220:12)
    at resolveImportType (/Users/price/Repos/redwoodjs-redwood/node_modules/eslint-plugin-import/lib/core/importType.js:148:65)
    at computeRank (/Users/price/Repos/redwoodjs-redwood/node_modules/eslint-plugin-import/lib/rules/order.js:317:44)
See: https://github.com/tleunen/eslint-import-resolver-babel-module/pull/34

@peterp could you take a look and let me know any thoughts about how to diagnose?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant