Registry /
testing / eslint-import-resolver-exports
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
resolver (via settings)
✓ settings: { 'import/resolver': { exports: { /* options */ } } }
✗ import resolver from 'eslint-import-resolver-exports'
This package is used as an ESLint plugin resolver, not imported directly. Configuration is done via settings['import/resolver'].
default export (CommonJS require)
✓ const resolver = require('eslint-import-resolver-exports')
If you need the resolver function directly, you can require the package. It returns a resolver compatible with eslint-plugin-import.
ESM import
✓ import resolver from 'eslint-import-resolver-exports'
✗ const resolver = require('eslint-import-resolver-exports').default
The package exports a default function. In ESM, use default import; in CJS, use require directly.
Basic ESLint configuration to resolve package exports using both node and exports resolvers.
// .eslintrc.js
module.exports = {
extends: ['plugin:import/recommended'],
plugins: ['import'],
settings: {
'import/resolver': {
node: {},
exports: {
// Options go here
conditions: ['node', 'import'],
},
},
},
rules: {
'import/no-unresolved': 'error',
},
};
Errors
Common errors & fixes
Module not found: Can't resolve 'some-package' in 'some/file'
exports resolver not configured or missing; the resolver doesn't fallback to node resolution.
fixAdd another resolver (e.g., node) to settings['import/resolver'].
Unable to resolve path to module 'some-package'.
The package's exports field may not include the subpath you're trying to import.
fixCheck the package's exports map; add fallback resolver or use a different import path.
Upgrade
Version history
1.0.0-beta.5latest on npm
Audit
Dependencies
eslint-plugin-importrequiredpeer dependency: required for resolver functionality
eslintrequiredpeer dependency: required for runtime