I am trying to deploy a discord bot, I created my app in TS. When I issue fly launch I am having following error
===> BUILDING
[INFO] Node.js Buildpack
[INFO] Setting NODE_ENV to production
[INFO] Installing toolbox
[INFO] - yj
[Installing Node]
[INFO] Getting Node version
[INFO] Resolving Node version
[INFO] Downloading and extracting Node v16.13.0
[Parsing package.json]
[INFO] Parsing package.json
[INFO] No file to start server
[INFO] either use 'docker run' to start container or add index.js or server.js
#
# Fatal process OOM in Failed to reserve virtual memory for CodeRange
#
qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
ERROR: failed to build: exit status 133
Error executing lifecycle: failed with status code: 51
It seems like the compilation / build phase needs more memory. If this is running on a Fly builder, you could try passing —local-only to finish the build on your local machine.
This is a qemu bug on m1 Macs with Docker. --local-only won’t fix it, that just forces it to happen again. Try running fly deploy --remote-only. This will use a Docker daemon running on Fly and avoid any qemu Docker weirdness on an m1.
thanks @kurt I restarted my docker deamon and removed existing images and it worked for me but I think you are righ there is some compatiblity issues with M1. Is there any lighter image that I can use for node.js projects ? or do I have to write my own dockerfile if I want smaller footprint