-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
import/no-unresolved is throwed on nested module path #2357
Comments
That's because that import path relies on "exports" in that package - but https://unpkg.com/browse/[email protected]/package.json doesn't exist (as it should, for backwards compatibility). This is also because this plugin uses The ideal solution is for that package to add top-level files so that pre-exports node, and this plugin, can resolve them. Otherwise, you'll need to override that warning until |
I thought that if |
|
Weren't conditional exports introduced quite some time ago? Why they aren't supported and when will they be? |
The "exports" field itself was released in May 2020, in the middle of a pandemic, and that pandemic still continues. Another reason that it hasn't been pressing is that most packages that add "exports", care about backwards compatibility, and so resolution works the same with or without it for all documented entry points. It's only when a package drops "main" entirely, goes ESM-only, or fails to provide top-level entry points for back compat (like this one), that it becomes a problem. They will be supported when I'm going to close this since there's nothing for eslint-plugin-import to do, specifically. |
I have simple project, using
FormData
andfileFromPath
fromformdata-node
packagepackage.json
.eslintrc.json
test.js
npx eslint .\test.js
returnsSo no error for importing
FormData
from 'formdata-node', but it is on importingfileFromPath
from 'formdata-node/file-from-path'. Maybe this is because nested path? Butnode
runs my script without errorsAm missing something in my config? I tried to add this to
.eslintrc.json
But this doesn't help
The text was updated successfully, but these errors were encountered: