Commit 4869fa7
committed
Fix: Inject workspace-local package maps for island node-modules scripts
When scripts run from island workspaces using node-modules linker,
NODE_OPTIONS now correctly points to the workspace-local package map
(workspace/node_modules/.package-map.json) instead of the root package
map. This ensures Node can resolve packages from the island's layout.
The fix detects when a script's package is a workspace in an island
with node-modules linker, removes any existing root package map from
NODE_OPTIONS, and injects the workspace-local map path.
Resolves bug where island maps were generated but never used by scripts,
causing resolution failures in mixed PnP root + island node-modules setups.1 parent 6e80271 commit 4869fa7
1 file changed
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
749 | 749 | | |
750 | 750 | | |
751 | 751 | | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
752 | 786 | | |
753 | 787 | | |
754 | 788 | | |
| |||
0 commit comments