-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG](arborist) Lifecycle Scripts of file:
dependencies do not run
#4277
Labels
Bug
thing that needs fixing
Priority 2
secondary priority issue
ws:arborist
Related to the arborist workspace
Comments
fritzy
added
Needs Triage
needs review for next steps
ws:arborist
Related to the arborist workspace
labels
Jan 20, 2022
fritzy
changed the title
[BUG] Lifecycle Scripts of
[BUG](arborist) Lifecycle Scripts of Jan 20, 2022
file:
dependencies do not runfile:
dependencies do not run
ruyadorno
added
Priority 2
secondary priority issue
Bug
thing that needs fixing
and removed
Needs Triage
needs review for next steps
labels
May 9, 2022
ruyadorno
added a commit
to ruyadorno/cli
that referenced
this issue
May 10, 2022
- Fixes running proper lifecycle scripts for linked deps and workspaces. - Added test to validate lifecycle scripts don't run twice for linked deps - Tweaked "reify workspaces bin files" test to also validate proper lifecycle scripts ran before check for linked bins. - Tweaked reify test running lifecycle scripts of unchanged link nodes to also validate that the install lifecycle scripts are also called. Fixes: npm#4277 Fixes: npm#4552 Fixes: npm/statusboard#439 Relates to: npm#2905
ruyadorno
added a commit
to ruyadorno/cli
that referenced
this issue
May 10, 2022
- Fixes running proper lifecycle scripts for linked deps and workspaces. - Added test to validate lifecycle scripts don't run twice for linked deps - Tweaked "reify workspaces bin files" test to also validate proper lifecycle scripts ran before check for linked bins. - Tweaked reify test running lifecycle scripts of unchanged link nodes to also validate that the install lifecycle scripts are also called. Fixes: npm#4277 Fixes: npm#4552 Fixes: npm/statusboard#439 Relates to: npm#2905
wraithgar
pushed a commit
that referenced
this issue
May 10, 2022
- Fixes running proper lifecycle scripts for linked deps and workspaces. - Added test to validate lifecycle scripts don't run twice for linked deps - Tweaked "reify workspaces bin files" test to also validate proper lifecycle scripts ran before check for linked bins. - Tweaked reify test running lifecycle scripts of unchanged link nodes to also validate that the install lifecycle scripts are also called. Fixes: #4277 Fixes: #4552 Fixes: npm/statusboard#439 Relates to: #2905
should be fixed in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug
thing that needs fixing
Priority 2
secondary priority issue
ws:arborist
Related to the arborist workspace
What / Why
When
npm install
(npm v7.2.0/arborist v2.7.1)Where
How
Current Behavior
Arborist runs the lifecycle scripts for a package in the
_build
step ofreify
.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
npm i --foreground-scripts
(to verify the output of the postinstall)Expected Behavior
Who
References
The text was updated successfully, but these errors were encountered: