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

Switch to package.json prepack script so that yarn can install from git #1979

Closed
cspotcode opened this issue Mar 29, 2023 · 1 comment · Fixed by #1980
Closed

Switch to package.json prepack script so that yarn can install from git #1979

cspotcode opened this issue Mar 29, 2023 · 1 comment · Fixed by #1980

Comments

@cspotcode
Copy link
Collaborator

Related: #1958 (comment)

When installing directly from git, we have our package.json configured to run the build. We are currently using prepare for this, but yarn does not support that and recommends prepack instead.

npm docs seems to agree https://docs.npmjs.com/cli/v9/using-npm/scripts

Runs BEFORE a tarball is packed (on "npm pack", "npm publish", and when installing a git dependency).

@4lph4-Ph4un
Copy link

You sure this install path from git works okay with Yarn >2?

This is from their documentation:

Note: For this workflow to work, make sure that each individual workspaces can be built just by running yarn install && yarn pack into each individual workspace. In particular, avoid third-party release scripts unless they use yarn pack under the hood.

Link to the referenced part:
https://yarnpkg.com/features/protocols#frequently-asked-questions

Here's my issue related to this #2002

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

Successfully merging a pull request may close this issue.

2 participants