Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Using Yarn 2 (Berry) on App Platform deployments
I’m trying to deploy a Node.js app to App Platform (great product by the way) using the current version of yarn. I bootstrapped the repository using
yarn set version berry.
The deployment installs yarn version 1.22.10 (which should be fine, since the
yarnrc.yml points to the correct yarn binary). When it comes to installing the dependencies, the deployment uses a flag that is no longer supported:
Below is the relevant section of the build log:
app | 01:15:04 => Building app app | 01:15:04 app | 01:15:04 ---> Node.js Buildpack app | 01:15:04 ---> Installing toolbox app | 01:15:04 ---> - jq app | 01:15:05 ---> - yj app | 01:15:05 ---> Getting Node version app | 01:15:05 ---> Resolving Node version app | 01:15:07 ---> Downloading and extracting Node v12.21.0 app | 01:15:21 ---> Parsing package.json app | 01:15:23 ---> Installing email@example.com app | 01:15:28 ---> No file to start server app | 01:15:28 ---> either use 'docker run' to start container or add index.js or server.js app | 01:15:28 Installing node_modules using yarn (from yarn.lock) app | 01:15:29 Unknown Syntax Error: Unsupported option name ("--network-timeout"). app | 01:15:29 app | 01:15:29 $ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--skip-builds] app | 01:15:29 unable to invoke layer creator app | 01:15:29 installing node_modules: exit status 1 app | 01:15:29 ERROR: failed to build: exit status 1 app | 01:15:29 ! Build failed (145)
Is it planned to support the current version of yarn on the App Platform?
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.×