-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Priority 1high priority issuehigh priority issueRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release
Description
Current Behaviour:
It seems that prepare scripts are now run in parallel, which means that if:
A
depends onB
B
'sprepare
script takes some time. e.g. runstsc
A
usesB
in its prepare script e.g. runs owntsc
which requiresB
to be built first
Then A
's prepare
script will fail because B
's has not completed.
If I switch the package.json scripts from prepare
to prepublish
then it seems to work without a problem.
Is there an alternative lifecycle script to the deprecated prepublish
?
This may be an arborist
issue.
Expected Behaviour:
npm install
should wait for dependent's prepare
scripts to complete before running.
Steps To Reproduce:
I've tried to capture a reproduction here:
https://github.com/timoxley/npm7-prepare-issue
git clone git@github.com:timoxley/npm7-prepare-issue.git
cd npm7-prepare-issue
npm install # this will break
npm install # works on second run
# run this to clean up and try again
npm run clean
Environment:
- OS: MacOS 11.2.3
- Node: v14.16.0
- npm: 7.8.0
harbu, juslesan, felschr, alvis and shanefontaine
Metadata
Metadata
Assignees
Labels
Priority 1high priority issuehigh priority issueRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release