Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './x' is not defined by "exports"
You imported a deep path inside a package that its package.json "exports" field doesn’t expose.
is not defined by "exports" Meaning
Packages with an exports map hide internal files. Deep imports that worked before an upgrade break, and old tooling (e.g. old webpack/postcss) may request unexported paths.
Common causes
- Deep import into a package’s internals
- Package upgraded and changed its exports
- Old tool incompatible with the new package version
⚡ Quick fix
- Import from the documented public entry point
- Upgrade the tool that does the deep import
- Pin the previous package version if necessary
Detailed fix by platform
Node.js
- Check the package's package.json "exports" to see allowed subpaths
How to diagnose
- Path — Which subpath?
- Exports — What does the package expose?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- 0x8007007E 0x8007007E: The specified module could not be found
- DEP0040 DeprecationWarning: The `punycode` module is deprecated (DEP0040)
- Dependency requires compileSdk Dependency 'androidx.x:1.y' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs
Most viewed in Node.js
Other ways to find it
Where this error sits
Origin: Application & API. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 14 Oct 2026