Rayrun
← Back to Discord Forum

vs code extension pnp support

👋 I forked the playwright vscode extension and edited it to support yarn pnp in my project. There are a couple other similar PRs already but I think that this approach may be a reasonable way to support without introducing random implementation details to the project. Would the team be interested in adding this upstream? https://github.com/microsoft/playwright-vscode/compare/main...chasestarr:playwright-vscode-yarn-pnp:playwright-env-node-options I'm happy to edit it in any way if there are suggestions

This thread is trying to answer question "Would the team be interested in adding support for yarn pnp in the playwright vscode extension?"

9 replies
pavelfeldman
pavelfeldman

I think we are ready to add the support for pnpm. I'm not seeing it in the diff though.

Thanks for responding Pavel. Are you referring to this PR that can configure which package manager to install playwright? https://github.com/microsoft/playwright-vscode/pull/283/files This is not quite sufficient for my needs since it is currently limited to the install command, but maybe this config could be used to call node similar to here https://github.com/microsoft/playwright-vscode/pull/277

pavelfeldman
pavelfeldman

I was not referring to any of thr prs specifically, was saying that overall we should support it.

Ah ok. I put this branch up as a PR here https://github.com/microsoft/playwright-vscode/pull/301. It should support pnpm and yarn 2 with a small amount of configuration

Hi, checking in on this again. Is the team interested in looking at that PR?

hey @starr , I realize this is pretty old -- but it seems with yarn pnp thsi fix does not really work: it finds the files, but none get executed

.. any idea why this could be?

also I had to add:

"playwright.env": {
  "NODE_OPTIONS": "-r ../../.pnp.cjs"
}

instead of ./.pnp.cjs in the vscode settings..

no idea how to debug this.. I get no output in any terminal i can see.. just blank execution

Screenshot_2023-11-06_at_15.57.52.png

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.