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

fix: Remove corepack upgrade step from corepack build target #1668

Merged
merged 2 commits into from
Aug 11, 2022

Conversation

chris-olszewski
Copy link
Member

The corepack step as it exists causes issues if a machine already has corepack enabled and is using the npm shim:

olszewski@chriss-mbp cli % make corepack
npm install -g corepack@latest
Usage Error: This project is configured to use pnpm

$ npm ...
make: *** [corepack] Error 1

I think we could get around this by changing to a working directory without a packageManager, but that feels very icky. Since we were only upgrading corepack in order to avoid #110 which only happens the first time a user sets up a package manager on a machine, I think this an acceptable regression in order to unblock development.

We should follow what comes out of #157 to see if we can add this back eventually.

@vercel
Copy link

vercel bot commented Aug 9, 2022

@chris-olszewski is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@mehulkar mehulkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chris-olszewski
Copy link
Member Author

I think nodejs/corepack#157 is relevant here?

Yup, I linked to it at the end of the commit message.

I'm not too familiar with makefile syntax, but could we change it to a conditional instead? Something like:
  ```shell
  which corepack
  if [ $? -ne "0" ]; then
    npm install -g corepack@latest
  fi
  ```

We could add that, but I don't think the conditional will run for the most part since corepack is being distributed alongside node.

@chris-olszewski chris-olszewski added the pr: on hold Pull requests that are "on hold" and should not be merged label Aug 10, 2022
The corepack step as it exists causes issues if a machine already has corepack enabled and is using the npm shim:
```
olszewski@chriss-mbp cli % make corepack
npm install -g corepack@latest
Usage Error: This project is configured to use pnpm

$ npm ...
make: *** [corepack] Error 1
```

I think we could get around this by changing to a working directory without a packageManager, but that feels very icky.  Since we were only upgrading corepack in order to avoid [#110](nodejs/corepack#110) which only happens the first time a user sets up a package manager on a machine, I think this an acceptable regression in order to unblock development.

We should follow what comes out of [vercel#157](nodejs/corepack#157) to see if we can add this back eventually.
Copy link
Contributor

@mehulkar mehulkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me (even before your change). It seems we should consider corepack an experiment for local dev right now and make it recommended once we've ironed out these issues?

@nathanhammond's ✅ would be useful also since he did the original work!

@chris-olszewski chris-olszewski merged commit 58469ac into vercel:main Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: on hold Pull requests that are "on hold" and should not be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants