I followed this documentation to specify my Node and Yarn versions in the package.json. I’d like my app to build using Yarn 2+, but when I check the build logs it fails. Does the app platform only support Yarn 1?
Buildpack: buildpack-stack=ubuntu-22
package.json:
"engines": {
"node": "18.x",
"yarn": "^4.0.1"
},
build log:
[2023-12-03 15:06:05] ╭──────────── git repo clone ───────────╼
[2023-12-03 15:06:05] │ › fetching app source code
[2023-12-03 15:06:05] │ => Selecting branch "main"
[2023-12-03 15:06:07] │ => Checking out commit "c5b243c2e69acb46cb2b2a96f77c1bb9ccf4fa15"
[2023-12-03 15:06:07] │
[2023-12-03 15:06:07] │ ✔ cloned repo to /workspace
[2023-12-03 15:06:07] ╰────────────────────────────────────────╼
[2023-12-03 15:06:07]
[2023-12-03 15:06:07] › configuring build-time app environment variables:
[2023-12-03 15:06:07] YARN_PRODUCTION FIRESTORE_SERVICE_ACCOUNT AUTH_GITHUB_CLIENT_SECRET LOGGER_GRAFANA_API_KEY AUTH_SUPERTOKENS_API_KEY
[2023-12-03 15:06:07]
[2023-12-03 15:06:07] › configuring custom build command to be run at the end of the build:
[2023-12-03 15:06:07] │ yarn prod:build
[2023-12-03 15:06:07]
[2023-12-03 15:06:07] ╭──────────── buildpack detection ───────────╼
[2023-12-03 15:06:07] │ › using Ubuntu 22.04 stack
[2023-12-03 15:06:07] │ Detected the following buildpacks suitable to build your app:
[2023-12-03 15:06:07] │
[2023-12-03 15:06:07] │ heroku/nodejs-engine v0.5.2
[2023-12-03 15:06:07] │ digitalocean/node v0.3.6 (Node.js)
[2023-12-03 15:06:07] │ digitalocean/procfile v0.0.4 (Procfile)
[2023-12-03 15:06:07] │ digitalocean/custom v0.1.2 (Custom Build Command)
[2023-12-03 15:06:07] │
[2023-12-03 15:06:07] │ For documentation on the buildpacks used to build your app, please see:
[2023-12-03 15:06:07] │
[2023-12-03 15:06:07] │ Node.js v0.3.6 https://do.co/apps-buildpack-node
[2023-12-03 15:06:07] ╰─────────────────────────────────────────────╼
[2023-12-03 15:06:07]
[2023-12-03 15:06:07] ╭──────────── app build ───────────╼
[2023-12-03 15:06:07] │ ---> Node.js Buildpack
[2023-12-03 15:06:07] │ ---> Installing toolbox
[2023-12-03 15:06:07] │ ---> - jq
[2023-12-03 15:06:08] │ ---> - yj
[2023-12-03 15:06:09] │ ---> Getting Node version
[2023-12-03 15:06:09] │ ---> Resolving Node version
[2023-12-03 15:06:12] │ ---> Downloading and extracting Node v18.19.0
[2023-12-03 15:06:20] │ ---> Parsing package.json
[2023-12-03 15:06:22] │
[2023-12-03 15:06:22] │ ! Yarn v2+ is not supported on this App Platform stack. Please visit our documentation for more information on supported versions and stacks: https://do.co/apps-buildpack-node
[2023-12-03 15:06:22] │
[2023-12-03 15:06:22] │ ERROR: failed to build: exit status 1
[2023-12-03 15:06:22] │
[2023-12-03 15:06:22] │
[2023-12-03 15:06:22] │ For documentation on the buildpacks used to build your app, please see:
[2023-12-03 15:06:22] │
[2023-12-03 15:06:22] │ Node.js v0.3.6 https://do.co/apps-buildpack-node
[2023-12-03 15:06:22] │
[2023-12-03 15:06:22] │ ✘ build failed
[]
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
I’m facing the same issue. Did you found any solution?
Also facing the same issue, this would be super beneficial to customize if possible!