-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Getting "Please install @playwright/test package to use Playwright Test." #6981
Comments
You don't need yarn init -y
yarn add --dev @playwright/test
npx playwright test |
Had the same issue, because previous beta versions of Solution:
Then it works. |
Note/question: for projects using Playwright for both unit tests and e2e tests, could this be a problem? or is |
In my case,
Success!!! |
Yep. This worked. |
I ran into this issue because I had I fixed by adding this to
|
The solutions above did not work for me, I couldn't figure out how to get past
... when running Resolved by running See also #8495 for another snag one may encounter when using Yarn 2 PnP and (props to @merceyz) |
I've been trying everything I can think of to get testing to work in an Azure Pipeline. My YAML:
but I get...
If I try to use
What is the magic combination to make this work?? |
@nathanchase, does |
Yes, works fine locally. |
@nathanchase, stab in the dark, but maybe you need to run |
Well, that's why I was using their Docker container, since it's supposed to have all that stuff preinstalled and ready to go. I tried manually installing everything and not using the container, and still had the same result. I just need to find someone that actually has a working Azure DevOps .yaml for Playwright. I've come across some that are for Windows/.NET, but nothing for Linux/Node based projects. |
@nathanchase, just realized it should be I assume using Windows or macOS is not an option? https://playwright.dev/docs/ci/#azure-pipelines mentions that possibility. If you haven't already, try not using their Docker container and instead running (I was previously using |
Faced with the same problem on node version 12.19.1 |
Latest node version or latest playwright version? |
Latest node version |
I'm running into this as well, yarn 3.2.4 on Windows 11. I installed playwright for the first time using |
For anybody experiencing this after upgrading to 1.34.0 (I am), I think this may be related to #23098 |
I am getting this issue only in Azure pipelines. And I don't have playwright installed "keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@playwright/test": "^1.34.3",
"chai": "^4.3.7"
},
"dependencies": {
"nodemon": "^2.0.22"
}
} |
Why I can't use both. In our project we use monorepo. And one of application in this monorepo uses crawlee: https://www.npmjs.com/package/crawlee where in dependencies it use playwright. So now we have to choose should we test out product, or use one of our critical application. And it means that we need to use cypress instead of playwright for testing or other framework. |
If anyone else ends up here looking for a solution. The root cause of this problem is that the If you have both packages installed then whether If you need to have both installed, the only way I've found to work around this is to install postinstall-postinstall and add a
This will force the symlink to the package to be replaced with the |
@jasonk thanks for the pointer! I used a different workaround - pass the full path to cli.js in package.json's - "test": "playwright test",
+ "test": "node_modules/@playwright/test/cli.js test", |
I'm also using a monorepo facing this exact issue. With monorepos becoming increasingly popular I think this problem really needs a better solution. Even without a monorepo, it's entirely possible that you have a project that has a different dependency that installs |
i just encountered this issue. it really is problematic and counter intuitive that both packages have the same cli name and conflict. |
with the attempt to migrate to pnpm i started reproducing this issue as well |
Thank you! I just had to explicitly install @playwright/test in the github workflow yml. This error was bothering as it didn't happen in my local runs. I didn't have to remove playwright. Not sure if/where that package is installed. |
Reproducing this issue using pnpm. |
Solved! In my case I was having same problems as @thecodrr - My solution was to disable Forcepoint/Websense |
I had this issue in a repo using npm workspaces. |
Hey, team
|
Context:
System:
Binaries:
Languages:
npmPackages:
Describe the bug
I just installed
playwright
version1.12
to try out the new test runner but I am consistently gettingPlease install @playwright/test package to use Playwright Test.
no matter how many times I doyarn add --dev @playwright/test
.The text was updated successfully, but these errors were encountered: