ESLint error importing module
See original GitHub issuewhen I try to import the library, I get eslint errors:
import { AnimatedSwitch } from 'react-router-transition';
the errors are:
[eslint] Unable to resolve path to module 'react-router-transition'. (import/no-unresolved)
[eslint] Missing file extension for "react-router-transition" (import/extensions)
I would love to know whats the error, so I can myself fix this with a PR. I want to contribute!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
ESLint - Error: Must use import to load ES Module
The error occurs in every single one of my .js and .ts/ .tsx files where I only use import or the file doesn't...
Read more >no-restricted-imports - ESLint - Pluggable JavaScript Linter
Imports are an ES6/ES2015 standard for making the functionality of other modules available in your current module. In CommonJS this is implemented through ......
Read more >eslint-plugin-import - npm
This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import ...
Read more >Issues · import-js/eslint-plugin-import - GitHub
ESLint plugin with rules that help validate proper imports. ... node:test is not considered a builtin module by import/order.
Read more >eslint-plugin-import | Yarn - Package Manager
This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import names. All...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
might have something to do with the package.json–i forgot to update the
modules
andjsnext:main
fields. that said, this very likely depends on your webpack/eslint config.Thanks for the enthusiasm! Always appreciated.
How is your project configured? It looks to me like you forgot to run npm install and the plugin can’t find the module, or your
eslint-plugin-eslint
isn’t properly configured to resolve yournode_modules
folder. Did you check out the resolvers documentation yet?