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

Instructions for contributing not working for me #361

Open
tamslinn opened this issue May 24, 2022 · 2 comments
Open

Instructions for contributing not working for me #361

tamslinn opened this issue May 24, 2022 · 2 comments

Comments

@tamslinn
Copy link

I'm trying to prepare a pull request for issue #341 but I can't commit it.
Even if I do a fresh checkout of the project and try to commit a minor change I have the same problem.

I’ve run
pnpm install --frozen-lockfile
When I try to commit my changes, it runs the pre-commit hook, which runs
pnpx pretty-quick --staged
But this fails with the message

.
└─┬ pretty-quick
  └── ✕ missing peer prettier@>=2.0.0
Peer dependencies that should be installed:
  prettier@>=2.0.0  

I can see that prettier 2.3.2 is installed in the node_modules directory (and it is in package,json). I’ve also tried doing pnpm add -g prettier but it doesn’t help.

Sorry if I am missing something obvious but I am not familiar with pnpm which is making it hard for me to contribute. I am wondering if there is something missing from the contribution instructions?

@filoxo
Copy link
Contributor

filoxo commented Jul 26, 2022

This appears to be a compat problem with pnpm 7 and husky 7. Migrating to husky 8 should fix it per pnpm/pnpm#4657

I also had this same issue in the single-spa-react repo so if anyone comes across this elsewhere, that might be helpful to update in that repo as well.

@filoxo
Copy link
Contributor

filoxo commented Jul 26, 2022

I started seeing this again even after upgrading. I solved this by replacing pnpx with pnpm here

pnpx pretty-quick --staged

so that the command would use the locally installed pretty-quick dependency rather than from the pnpx cache.

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

No branches or pull requests

2 participants