Skip to content

fix: resolve @playwright/test from project cwd, not action dist direc…#34

Merged
DeDuckProject merged 1 commit intomainfrom
fix/playwright-resolve-from-cwd
Mar 14, 2026
Merged

fix: resolve @playwright/test from project cwd, not action dist direc…#34
DeDuckProject merged 1 commit intomainfrom
fix/playwright-resolve-from-cwd

Conversation

@DeDuckProject
Copy link
Copy Markdown
Owner

…tory

When running as a GitHub Action, the action bundle lives in a separate directory from the user's project (e.g. /home/runner/work/_actions/...). Dynamic import() resolves bare specifiers from the calling file's location, so @playwright/test couldn't be found.

Use createRequire(join(process.cwd(), 'package.json')) instead so the package is resolved from the user's project directory where they have it installed.

…tory

When running as a GitHub Action, the action bundle lives in a separate
directory from the user's project (e.g. /home/runner/work/_actions/...).
Dynamic import() resolves bare specifiers from the calling file's location,
so @playwright/test couldn't be found.

Use createRequire(join(process.cwd(), 'package.json')) instead so the
package is resolved from the user's project directory where they have it
installed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@DeDuckProject DeDuckProject merged commit bc33c15 into main Mar 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant