question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ESLint error importing module

See original GitHub issue

when 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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
maisanocommented, Sep 8, 2017

might have something to do with the package.json–i forgot to update the modules and jsnext:main fields. that said, this very likely depends on your webpack/eslint config.

1reaction
jacobangelcommented, Sep 5, 2017

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 your node_modules folder. Did you check out the resolvers documentation yet?

Read more comments on GitHub >

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

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found