heroku / heroku/buildpacks-nodejs

Error with yarn version validation

Open
#937 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
28
Forks
17
Avg merge
1d 16h
Merged PRs (30d)
14

Description

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.

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with the reported pack build command and the package.json Yarn engine range. Start at the buildpack's Yarn version check and examine how the yarn version command handles a non-zero exit; done means the command's output is included in the build log when validation fails.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.