-
Notifications
You must be signed in to change notification settings - Fork 29
Closed
Description
You can't yarn install (or npm install) in a postinstall script. It's not safe.
Yarn e.g. is unsafe to use (when hitting its cache, such as install, add, upgrade, ...) concurrently. Yarn runs multiple postinstall scripts in parallel, and if multiple packages do 'yarn install', the cache (hence packages) can become corrupt.
I've gotten around this by wrapping yarn and adding a host-level mutex around it, but then I can't install anything that depends on full-icu.
Consider a different approach.
Plus, you're bypassing yarn's/npm's own dependency graph optimization/flattening.
ea167, srl295, micapam, fzxt and topheman
Metadata
Metadata
Assignees
Labels
No labels