ERR_PACKAGE_PATH_NOT_EXPORTED
node
esm
ai_generated
true
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './internal' is not defined by exports
ID: node/err-package-path-not-exported
92%Fix Rate
94%Confidence
50Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 20 | active | — | — | — |
Root Cause
Importing a subpath that the package's exports map doesn't expose.
genericWorkarounds
-
93% success Use the package's public API — check its package.json exports field for available paths
Import from the documented public paths, not internal modules
-
85% success If the subpath was previously available, check the changelog for migration instructions
The maintainer likely moved it or removed it intentionally in a major version
Dead Ends
Common approaches that don't work:
-
Patching node_modules to add the export
90% fail
Will be overwritten on next npm install
-
Using require.resolve with custom paths
70% fail
Bypasses package boundaries; may break with updates
Error Chain
Frequently confused with: