Hi friends! I’m setting up a new Node Fly app, and I’m running into an issue with my release command I’m trying to debug.
My command is
yarn prisma migrate deploy.
I’m getting these logs:
Configuring virtual machine
Pulling container image
Preparing kernel init
Setting up swapspace version 1, size = 512 MiB (536866816 bytes)
Preparing to run: `launcher yarn prisma migrate deploy` as heroku
2022/06/27 23:54:32 listening on [fdaa:0:71a7:a7b:8aeb:93f0:75eb:2]:22 (DNS: [fdaa::3]:53)
Main child exited normally with code: 127
Starting clean up.
I’m not sure what’s going on here, and I can’t find any logs to help. 127 usually means the command isn’t found, but I’m not sure why
yarn wouldn’t be available.
Is there a way to get richer logs from whatever is running the release command? (Also, what is running the release command?)
FWIW, if I ssh into the machine, and run
launcher yarn prisma migrate deploy, it also says
yarn: yarn: command not found, and if I run
su -c 'launcher yarn prisma migrate deploy', I get
bash: launcher: command not found.
More debugging: if I set the release command to
yarn --version, I still get a 127. Maybe
yarn isn’t installed? Do I need to use npm?
Figured it out; that was indeed the problem.
For future reference: Heroku decides whether to use
npm based on the presence of a
yarn.lock. I switched over to a monorepo recently, and yarn puts
yarn.lock in the root of the repo instead of in each workspace. Because I’m only deploying the server,
yarn.lock no longer exists in the directory being deployed, which meant
yarn wasn’t used, so the commands above failed.
In general, would still be nice to have better logging on the release command.
I think the release command logs streams to your app’s logs. You should be able to find the whole logs there.
Not sure if it helps much in this case. I think that would’ve been part of the builder logs where it mentions what “things” it detected.