-
Notifications
You must be signed in to change notification settings - Fork 126
Open
Description
Command : tsc --noEmit && oc package .
Key points:
-
oc package checks the local workspace's node_modules for oc-template-esm-compiler
-
With npm workspaces, this package gets hoisted to the root node_modules
-
oc then tries to npm install it into the local node_modules, which also fails because npm workspaces manages that directory
-
The fix should be to use Node's standard require.resolve() which naturally traverses parent node_modules directories, rather than checking only the local one
Workaround:
- Creating directory junctions/symlinks from each workspace's node_modules to the hoisted package as part of a npm postinstall script
Note: It looks like there is some handling where the package command tries to install the compiler if it can't find it in the local node_modules but in my scenario this would always fail to install.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels