# Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './x' is not defined by "exports"

**Code:** `ERR_PACKAGE_PATH_NOT_EXPORTED` · **Category:** Node.js · **Seen on:** Node.js

You imported a deep path inside a package that its package.json "exports" field doesn’t expose.

## 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

1. Import from the documented public entry point
2. Upgrade the tool that does the deep import
3. Pin the previous package version if necessary

## Detailed fix by platform

### Node.js

1. Check the package's package.json "exports" to see allowed subpaths

## How to diagnose

1. **Path** — Which subpath?
2. **Exports** — What does the package expose?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/nodejs/err-package-path-not-exported)
