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

Pass yarn install options #244

Open
dfreilich opened this issue Aug 17, 2021 · 5 comments
Open

Pass yarn install options #244

dfreilich opened this issue Aug 17, 2021 · 5 comments
Labels
enhancement A new feature or request

Comments

@dfreilich
Copy link
Contributor

What happened?

  • What were you attempting to do?
    I'd like to provide yarn install with one of the CLI options - specifically, call it with yarn --registry <MY_REGISTRY>.

  • What did you expect to happen?
    I was expecting the yarn buildpack to respect an ENV variable that would allow me to set yarn options

  • What was the actual behavior? Please provide log output, if possible.
    There is no such env variable that allows configuring yarn install behavior.

Build Configuration

  • What platform (pack, kpack, tekton buildpacks plugin, etc.) are you
    using? Please include a version.
    This is with pack v0.20.0

  • What buildpacks are you using? Please include versions.
    yarn install @v0.4.0

  • What builder are you using? If custom, can you provide the output from pack inspect-builder <builder>?
    paketobuildpacks/builder:base

  • Can you provide a sample app or relevant configuration (buildpack.yml,
    nginx.conf, etc.)?

@dfreilich
Copy link
Contributor Author

In this case, there's a bug in yarn that makes it not accept environment variables (yarnpkg/yarn#2091), so passing it in as a yarn install option would be really helpful

@arjun024
Copy link
Member

I think we can take it as a feature request where users can request custom extra flags, something like BP_YARN_INSTALL_FLAGS="--X Y --Z A". Given there's a way around it via yarnrc, we'll take it as a low-prio feature request

@fg-j
Copy link

fg-j commented May 23, 2022

Hey @paketo-buildpacks/nodejs-maintainers. I'm curious if you think this feature request is still valuable given that .npmrc and .yarnrc service bindings are now available.

@ryanmoran
Copy link
Member

I'm wondering if @dfreilich can speak to whether or not the issue is resolved by #292.

@dfreilich
Copy link
Contributor Author

I think it could still be useful. Currently, our system writes a .yarnrc file in all cases and passes it along to pack, so #292 doesn't quite help in that sense, and the advantage of this would be that we'd save on creating that file for every single build we do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature or request
Projects
None yet
Development

No branches or pull requests

4 participants