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

prepare script blocks correct usage #480

Closed
hesxenon opened this issue May 16, 2024 · 2 comments
Closed

prepare script blocks correct usage #480

hesxenon opened this issue May 16, 2024 · 2 comments

Comments

@hesxenon
Copy link

Hello there,

I'm not sure whether I've just missed an existing issue in which case I am deeply sorry - but the issue is as follows:

  1. clone any project that...
    • has corepack configured to a higher version than your current PM
    • has a prepare script that utilizes a binary from node_modules/.bin
    • uses engines strict (?)
  2. try to install dependencies - fails, wrong PM version
  3. try to upgrade PM - fails, because prepare script is run without binary

It's worth noting that corepack downloads the correct PM, but apparently fails to "activate" it due to the prepare script exiting with non-zero.

E.g.:

  1. setup husky
  2. run corepack use <PM>
  3. git clean or similar
  4. try to switch to any other PM
  5. deadlock
@aduh95
Copy link
Contributor

aduh95 commented May 16, 2024

Thanks for sending this! I'm not sure I understand the issue, and the repro steps you provided are a bit too vague. Could you send a list of commands I could run to see the issue on my machine?

@hesxenon
Copy link
Author

hmmmm, upon trying to create such a list of steps I noticed that I was unable to reproduce the issue. I think the original problem happened due to either a misusage of corepack (use vs. install) and/or a bit of a nvm/pnpm managed node version conflict on my machine.

Closing for now but I don't think this will re-occur, sorry to bother you

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