heroku / buildpacks-nodejs

Heroku's Cloud Native Buildpacks for Node.js applications.
BSD 3-Clause "New" or "Revised" License
2 stars 2 forks source link

Error with yarn version validation #937

Open jwhitcraft opened 3 days ago

jwhitcraft commented 3 days ago

Hello,

I'm trying to test building our Rails apps with the heroku-24 build pack. But when I do, i get the following error:

pack build fms --path . --builder public.ecr.aws/heroku/builder:24
24: Pulling from heroku/builder
Digest: sha256:577b297e0f86f33607a2c32fe06a734b2e6eb8639deec3295b4d67e943a8c964
Status: Image is up to date for public.ecr.aws/heroku/builder:24
24: Pulling from heroku/heroku
Digest: sha256:b2e3a768f6a89d3c47def9bda468b15eb9ba66ca4973e05546417b99bdefe94a
Status: Image is up to date for public.ecr.aws/heroku/heroku:24
0.20.3: Pulling from buildpacksio/lifecycle
Digest: sha256:6528df63e9cafd1747f04fc57cad7b3910dce6be0e6cf49e8174fb2aeda69ef6
Status: Image is up to date for buildpacksio/lifecycle:0.20.3
===> ANALYZING
[analyzer] Image with name "fms" not found
===> DETECTING
[detector] 4 of 5 buildpacks participating
[detector] heroku/nodejs-engine 3.2.15
[detector] heroku/nodejs-yarn   3.2.15
[detector] heroku/ruby          3.0.0
[detector] heroku/procfile      3.1.2
===> RESTORING
===> BUILDING
[builder]
[builder] [Heroku Node.js Engine Buildpack]
[builder]
[builder] [Checking Node.js version]
[builder] Detected Node.js version range: 16.14.0
[builder] Resolved Node.js version: 16.14.0
[builder]
[builder] [Installing Node.js distribution]
[builder] Downloading Node.js 16.14.0 (linux-arm64) from https://nodejs.org/download/release/v16.14.0/node-v16.14.0-linux-arm64.tar.gz
[builder] Verifying checksum
[builder] Extracting Node.js 16.14.0 (linux-arm64)
[builder] Installing Node.js 16.14.0 (linux-arm64)
[builder] Installing application metrics scripts
[builder]
[builder] [Detecting yarn CLI version to install]
[builder] Detected yarn engine version range >=3.2.0 <3.3.0-0 in package.json
[builder] Resolved yarn CLI version: 3.2.4
[builder]
[builder] [Installing yarn CLI]
[builder] Downloading yarn 3.2.4
[builder] Extracting yarn 3.2.4
[builder] Installing yarn 3.2.4
[builder]
[builder] [Error: Yarn version error]
[builder] Couldn't determine yarn version: Yarn command finished with a non-zero exit code: exit status: 1
[builder] ERROR: failed to build: exit status 1
ERROR: failed to build: executing lifecycle: failed with status code: 51

I tried using --verbose but it didn't output any additional info.

When running locally, i was able to figure out that i was missing an ENV variable, but that was only after running yarn version locally.

IMO it would be beneficial to have the output from yarn version logged out if there is a non zero exit code.

colincasey commented 3 days ago

Thanks for filing this issue @jwhitcraft! Better reporting of executed commands is something we plan on addressing before these buildpacks are out of preview mode.