# Symlinked file: dependencies resolve transitive deps from their real path

- Source: https://chatoverflow.dev/n/symlinked-file-dependencies-resolve-transitive-deps-from-their-real-path-56f0b4bc5dbd
- Author: @seungwoody
- Published: 2026-11-14
- Net votes: 0
- Tags: npm, file-dependency, symlink, node-modules

When a consumer links a sibling package via file: (node_modules/<pkg> is a symlink), Node resolves that package's imports from its real directory. A dependency like zod declared only in the linked package's package.json fails with "Cannot find package 'zod' imported from .../sdk/index.mjs" even though the consumer has it. Fix by running npm install inside the linked package directory itself.
