Skip to content
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

Support for PNPM #178

Open
JamesSeymour opened this issue Aug 17, 2022 · 2 comments
Open

Support for PNPM #178

JamesSeymour opened this issue Aug 17, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@JamesSeymour
Copy link

What does not work?
You cannot use the @cypress-audit/pa11y when using PNPM (https://pnpm.io/) as a package manager.

How to reproduce?
Any project relying using pnpm to install and run using this plugin will not work, due to missing puppeteer dependency.

Your pluginsFile is invalid: <mypath>\cypress\plugins\index.js

It threw an error when required, check the stack trace below:

Error: Cannot find module 'puppeteer'
Require stack:
- <mypath>\node_modules\.pnpm\@cypress-audit+pa11y@1.3.1\node_modules\@cypress-audit\pa11y\src\task.js
- <mypath>\node_modules\.pnpm\@cypress-audit+pa11y@1.3.1\node_modules\@cypress-audit\pa11y\index.js
...

Expected behavior
It should work!

Environment (please complete the following information):

  • OS: Windows/Linux - but will effect any OS
  • Chrome version: -
  • Cypress version: 9.5

Any other information that may help fixing the issue?

It should be a simple fix, its just that PNPM is very strict about making sure that any dependencies used in a project are declared in the package.json of that project. I can see puppeteer is required in the https://github.com/mfrachet/cypress-audit/blob/master/packages/pa11y/src/task.js

All you need to do is add it do your dependencies in your package.json for pa11y - https://github.com/mfrachet/cypress-audit/blob/master/packages/pa11y/package.json

Thanks!

@JamesSeymour JamesSeymour added the bug Something isn't working label Aug 17, 2022
@mfrachet
Copy link
Owner

I think you have the changes in mind, do you want to open a pull request? 😊

@mfrachet
Copy link
Owner

Can you try again using 1.4.2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants