What are you trying to achieve?
Run codecept info (or the machine-info block printed by run --verbose) under Bun and get the installed Playwright browser versions reported.
What do you get instead?
playwrightBrowsers: "Playwright not installed" on an install where Playwright and its browsers are present and working.
getPlaywrightBrowsers() in lib/command/info.js hardcodes the Node package runner:
const info = execSync('npx playwright install --dry-run').toString().trim()
A Bun-only environment has no npx on PATH, so execSync throws and the catch reports Playwright not installed. That is a false negative rather than a visible error, which makes it look like a genuine misconfiguration.
Details
Reproduce with Bun installed and Node/npm absent from PATH:
$ PATH=/path/to/bun/bin:/usr/bin:/bin bun ./bin/codecept.js info <dir>
bunInfo: 1.4.2
playwrightBrowsers: "Playwright not installed"
Expected:
playwrightBrowsers: "chromium: 148.0.7778.96, firefox: 150.0.2, webkit: 26.4"
The workaround currently needed is symlinking npx to bun in the image, which is fragile and shouldn't be required just to read a version string.
Proposed fix
Pick the package runner from the runtime that is actually executing rather than from whatever PATH happens to hold — bunx under Bun, npx otherwise — detected via process.versions.bun. This is the same detection already used for getRuntimeInfo() in #5700. bunx playwright install --dry-run resolves the local node_modules/.bin/playwright and produces output identical to the npx form, so parsePlaywrightBrowsers() is unaffected and Node behaviour is unchanged.
This is the only place CodeceptJS actually shells out to npx; every other occurrence under lib/ is documentation text.
What are you trying to achieve?
Run
codecept info(or the machine-info block printed byrun --verbose) under Bun and get the installed Playwright browser versions reported.What do you get instead?
playwrightBrowsers: "Playwright not installed"on an install where Playwright and its browsers are present and working.getPlaywrightBrowsers()inlib/command/info.jshardcodes the Node package runner:A Bun-only environment has no
npxonPATH, soexecSyncthrows and thecatchreportsPlaywright not installed. That is a false negative rather than a visible error, which makes it look like a genuine misconfiguration.Details
Reproduce with Bun installed and Node/npm absent from
PATH:Expected:
The workaround currently needed is symlinking
npxtobunin the image, which is fragile and shouldn't be required just to read a version string.Proposed fix
Pick the package runner from the runtime that is actually executing rather than from whatever
PATHhappens to hold —bunxunder Bun,npxotherwise — detected viaprocess.versions.bun. This is the same detection already used forgetRuntimeInfo()in #5700.bunx playwright install --dry-runresolves the localnode_modules/.bin/playwrightand produces output identical to thenpxform, soparsePlaywrightBrowsers()is unaffected and Node behaviour is unchanged.This is the only place CodeceptJS actually shells out to
npx; every other occurrence underlib/is documentation text.