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

Errors seem silenced when yarn --version check fails #677

Open
josegonzalez opened this issue Oct 4, 2023 · 0 comments
Open

Errors seem silenced when yarn --version check fails #677

josegonzalez opened this issue Oct 4, 2023 · 0 comments

Comments

@josegonzalez
Copy link

I had an app that used a fontawesome api token in the .yarnrc.yml. Building this app without the environment variable caused build failures, but the error was not output so it took a few days to figure out the reason.

I think the code for that is here. My rust isn't great, but I think the buildpack just isn't outputting the errors for the user to see if that check fails.

Here is a .yarnrc.yml to use for repro:

nodeLinker: node-modules

npmScopes:
  fortawesome:
    npmAlwaysAuth: true
    npmAuthToken: "${FONTAWESOME_NPM_AUTH_TOKEN}"
    npmRegistryServer: "https://npm.fontawesome.com/"

yarnPath: .yarn/releases/yarn-3.5.1.cjs

And here is the output when that variable is missing and you call yarn --version

Usage Error: Environment variable not found (FONTAWESOME_NPM_AUTH_TOKEN) in /workspace/.yarnrc.yml (in /workspace/.yarnrc.yml)

The same issue exists in the v2a buildpack but that one has a different fix as it is written in shell.

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

1 participant