Config files loaded through node_modules/<pkg> symlinks cannot resolve the package's declared dependencies
#754
SummaryI hit this while testing an Expo / React Native app under aube. Expo's The reduced repro is intentionally tiny:
Reprogit clone https://github.com/mwolson/tmp-aube-issues
cd tmp-aube-issues/package-config-symlink-resolution
./repro.sh
Current output excerpt with aube Real-world impactIn the original Expo / React Native case, import expo.core.ExpoModulesPackage;The correct config-provided import is: import expo.modules.ExpoModulesPackage;Adding QuestionIs this expected behavior for a pnpm-style isolated symlink layout, where config loaders need to call I noticed that the reduced repro also fails under pnpm Relevant docs I checked:
Potential options I can see for mitigation:
|
Replies: 1 comment
|
Thanks for the detailed repro. Since the reduced case also fails under pnpm 11.1.3, I do not think this is an aube parity bug. It is a pnpm-style isolated symlink layout compatibility issue with config loaders that evaluate dependency-owned config files through The important distinction is that For aube, I opened a docs PR to call this out more explicitly and mention If you want to push this upstream, the best target is probably the React Native / Expo autolinking loader path rather than pnpm. I did not find an exact open upstream issue for this specific realpath/config-loader failure mode, though there are related Expo/RN + pnpm compatibility issues. This comment was generated by Codex. |
Thanks for the detailed repro. Since the reduced case also fails under pnpm 11.1.3, I do not think this is an aube parity bug. It is a pnpm-style isolated symlink layout compatibility issue with config loaders that evaluate dependency-owned config files through
node_modules/<pkg>/...without resolving the real path first.The important distinction is that
config-owner/expocan declare the dependency correctly and still fail if the loader preserves the top-level symlink path as the config file identity. The package dependencies are linked next to the package real path under the virtual store, so loaders shouldfs.realpathSync(...)the discovered config path before evaluating it.For aube, …