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.

missing file extension error

See original GitHub issue

Love the package! I believe this isn’t addressed by any of the other issues, although I only did a quick search for query.

When I import import maskIcon from 'src/components/Root/favicons/safari-pinned-tab.svg?external'; (I’m using a resource query because most svg’s go through react-svg-loader, but this one goes through file-loader), I get the following lint error:

  19:22  error  Missing file extension "svg" for "src/components/Root/favicons/safari-pinned-tab.svg?external"  import/extensions

Thank you! And happy new year 🎉

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ljharbcommented, Jan 14, 2020

This has since been fixed; in v2.20.0. Happy to reopen if not.

0reactions
dgautschcommented, Jan 14, 2020

I took some time to review this issue and from what i can tell eslint-plugin-import is handling query strings correctly and I can’t recreate the issue in the unit tests (albeit it’s a contrived scenario). My theory is that something is processing the node and stripping the extension/querystring before it reaches eslint-plugin-import. Will keep investigating.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Three Easiest Ways to Fix the "Missing File Extension 'tsx ...
The Three Easiest Ways to Fix the “Missing File Extension 'tsx'” Error · Add resolve.extensions: [". · Create React App Configuration Override ( ......
Read more >
Typescript eslint - Missing file extension "ts" import/extensions
I have a simple Node/Express app made with Typescript. And eslint give me the error. Missing ...
Read more >
[import/extensions] Missing file extension after upgrade to v2 ...
All import syntax (for ts and tsx files) got this kind of error. error Missing file extension for "./Query" import/extensions.
Read more >
Error Missing file extension ts for lib env import extensions
I have installed eslint-plugin-impor & eslint-import-resolver-typescript. And I cannot figure out why, I got that error.
Read more >
The case of the missing file extension - Office Watch
Fixing a bad or missing extension is soooo simple. The 'one off' fix is using the 'How do you want to open the...
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