chore: Remove npm bin
from scripts
#25913
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change removes the expression
export PATH=$(npm bin):$PATH
, which had formerly been used in scripts to ensurenode_modules
is inPATH
.npm bin
was removed in npm 9.npm exec
ornpx
should be used instead.build.sh
already usesnpx
. This change revisesscripts/gen.sh
to usenpx
as well.Prior to this change, within shells executing
build.sh
orscripts/gen.sh
,PATH
actually contains error text if npm 9+ is used.It didn't make
build.sh
fail, becauselerna
has been run vianpx
since #24217, andbuild.sh
doesn't need anything fromnode_modules
to be added toPATH
.export PATH=$(npm bin):$PATH
succeeds even thoughnpm bin
fails, perexport
's normal behavior.Prior to this change,
scripts/gen.sh
failed withwhen I ran it. After this change,
scripts/gen.sh
ran successfully.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license