fix: source nvm in playwright install script so npx is on PATH#86
Open
kohanyirobert wants to merge 1 commit intoschlich:mainfrom
Open
fix: source nvm in playwright install script so npx is on PATH#86kohanyirobert wants to merge 1 commit intoschlich:mainfrom
kohanyirobert wants to merge 1 commit intoschlich:mainfrom
Conversation
Author
|
One extra note is that I use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
When the
playwrightfeature runs itsinstall.shduring container build,npxis not found even when thenodefeature is listed as a dependency.Root cause: The
nodefeature adds/usr/local/share/nvm/current/bintoPATHviacontainerEnv. However,containerEnvis applied to the running container, not to feature install scripts during image build. Sonpxis never onPATHwhen playwright's install script executes.This affects users who add the playwright feature alongside an explicit node feature, or rely on the
dependsOn: nodedeclared indevcontainer-feature.json— the install order is correct, but the PATH is still missing.Fix
Source
nvm.shat the top ofinstall.shbefore callingnpx. Thesuinvocation (for non-root installs) also re-sources nvm since it starts a fresh shell environment.🤖 Generated with Claude Code