-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Bugthing that needs fixingthing that needs fixingPriority 2secondary priority issuesecondary priority issuews:arboristRelated to the arborist workspaceRelated to the arborist workspace
Description
What / Why
Arborist skips the lifecycle scripts of packages installed from a local path
When
- Running
npm install
(npm v7.2.0/arborist v2.7.1)
Where
- n/a
How
Current Behavior
Arborist runs the lifecycle scripts for a package in the _build
step of reify
.
I spent some time stepping through the debugger to see where the issue was happening and found this:
https://github.com/npm/arborist/blob/c5e1618a0059b37ee878b73553d7dc47bf3fa976/lib/arborist/reify.js#L973
I'm not sure what target.fsTop
is here or how it is calculated, but it seems that any packages installed with a local path, are skipped from the rebuild because of this condition.
Removing the condition allows the scripts to run correctly.
I will gladly work on this if someone could point me in the right direction.
Steps to Reproduce
- install a package with a local path (e.g. "dep-postinstall-test": "file:../dep-postinstall-test")
- ensure the package (dep-postinstall-test) has a postinstall script
- run
npm i --foreground-scripts
(to verify the output of the postinstall)
Expected Behavior
- postinstall scripts of all dependencies should run
Who
- n/a
References
- n/a
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingPriority 2secondary priority issuesecondary priority issuews:arboristRelated to the arborist workspaceRelated to the arborist workspace