9 months ago
I recently updated my project to use yarn v4. And now I am unable to deploy in railway.
I tried to set the nixpack install script to use yarn 4 but it has a line where it always runs "yarn run v1.22".
Does anyone know a way to fix this?
Error:
╔════════════════════════════ Nixpacks v1.24.0 ═══════════════════════════╗
Jul 13 19:24:48
║ setup │ nodejs_18, yarn-1_x ║
Jul 13 19:24:48
║─────────────────────────────────────────────────────────────────────────║
Jul 13 19:24:48
║ install │ corepack enable && yarn set version stable && yarn install ║
Jul 13 19:24:48
║─────────────────────────────────────────────────────────────────────────║
Jul 13 19:24:48
║ build │ yarn compile ║
Jul 13 19:24:48
║─────────────────────────────────────────────────────────────────────────║
Jul 13 19:24:48
║ start │ node build/server.js ║
Jul 13 19:24:48
╚═════════════════════════════════════════════════════════════════════════╝
> [stage-0 8/10] RUN --mount=type=cache,id=s/b19f3ac8-f84d-47bf-9215-801dbb471566-node_modules/cache,target=/app/node_modules/.cache yarn compile:
Jul 13 19:24:49
0.524 yarn run v1.22.22
Jul 13 19:24:49
0.567 error backend@1.0.0: The engine "yarn" is incompatible with this module. Expected version ">2.0.0". Got "1.22.22"
Jul 13 19:24:49
0.578 error Commands cannot run with an incompatible environment.
Jul 13 19:24:49
0.578 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
- UndefinedVar: Usage of undefined variable '$NIXPACKS_PATH' (line 18)
Jul 13 19:24:49
LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 18)
ERROR: failed to solve: process "/bin/bash -ol pipefail -c yarn compile" did not complete successfully: exit code: 1
Jul 13 19:24:49
Jul 13 19:24:49
Error: Docker build failed
3 Replies
9 months ago
I didn't have it set.
Although, I already reverted back to yarn 1.22 and now everything works fine.
I tried to go back and add the package manager with yarn v4in the package.json after I saw your comment but it seems that I am not able to upgrade to yarn v4 now without many issues.
(looks like the downgrade may have broken something)
Thanks for the help I'm going to stay with the old version for now. I really don't need yarn v4 anyway.
Status changed to Solved brody • 10 months ago