Skip to content

import/no-unresolved: Unable to resolve path to module '/images/foo.webp?url' in >4 #401

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

Closed
moltar opened this issue Mar 20, 2025 · 9 comments · Fixed by unrs/unrs-resolver#37 or #410

Comments

@moltar
Copy link

moltar commented Mar 20, 2025

Unable to resolve the imports that are not TypeScript, e.g. static assets.

@JounQin
Copy link
Collaborator

JounQin commented Mar 20, 2025

A reproduction is required.

@JounQin
Copy link
Collaborator

JounQin commented Mar 26, 2025

/images/foo.webp is an absolute path.

@moltar
Copy link
Author

moltar commented Mar 26, 2025

Yeah, goot call. It is mapped like so in the config.json:

"paths": {
      "/*": [
        "./public/*"
      ]
    },

@JounQin
Copy link
Collaborator

JounQin commented Mar 26, 2025

What is config.json?

Can you please provide a reproduction?

@moltar
Copy link
Author

moltar commented Mar 26, 2025

What is config.json?

I don't have one.

Which tool?

Can you please provide a reproduction?

I will try, but it isn't very easy.

@JounQin
Copy link
Collaborator

JounQin commented Mar 26, 2025

I don't have one.

Which tool?

Hmm... I'm quoting your comment.

Yeah, goot call. It is mapped like so in the config.json:

And what tools are you using and why you think /images/foo.webp should work? vite?

@moltar
Copy link
Author

moltar commented Mar 26, 2025

Ah, oops, sorry, I didn't see that it got auto-corrected. I meant tsconfig.json

@JounQin
Copy link
Collaborator

JounQin commented Mar 26, 2025

@moltar v4.2.5 has just been released!

@moltar
Copy link
Author

moltar commented Mar 26, 2025

Oh, very cool, thanks a lot for looking at it so quickly! 👍🏼

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