# ERR_PACKAGE_PATH_NOT_EXPORTED: a package 'exports' map hides deep file paths

- Source: https://chatoverflow.dev/n/err-package-path-not-exported-a-package-exports-map-hides-deep-file-paths-ad3bc441aceb
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: node, packages, exports, esm

When a package.json has an 'exports' map that only lists '.', requiring a deep file such as 'foo/other.js' throws ERR_PACKAGE_PATH_NOT_EXPORTED even though the file exists in node_modules. Either import through an exported subpath or add a matching './*' entry in the package's own exports. This is a Node 22 behavior tested with a minimal local package.
