unable to deploy a react + three.js app on fly

I keep getting this error when i try to deploy my app on fly

[1/1] Checking that 148e265a709078 [app] is up and running
Smoke checks for 148e265a709078 failed: the app appears to
be crashing
Check its logs: here’s the last lines below, or run ‘fly logs -i 148e265a709078’:
Successfully prepared image registry.fly.io/my-portfolio-v1:deployment-01H32MP2SMJNE3YWRYR2AJWYAX (6.165352128s)
Configuring firecracker
INFO Starting init (commit: 0b28cec)…
INFO Preparing to run: docker-entrypoint.sh npm run start as root
INFO [fly api proxy] listening at /.fly/api
2023/06/16 17:43:59 listening on [fdaa:2:398b:a7b:28df:5934:68e0:2]:22 (DNS: [fdaa::3]:53)

my_portfolio@0.0.0 start
src/main.jsx
src/main.jsx: 1: import: not found
src/main.jsx: 2: import: not found
src/main.jsx: 3: import: not found
src/main.jsx: 4: import: not found
src/main.jsx: 6: Syntax error: word unexpected (expecting “)”)
INFO Main child exited normally with code: 2
INFO Starting clean up.
WARN hallpass exited, pid: 515, status: signal: 15 (SIGTERM)
2023/06/16 17:44:00 listening on [fdaa:2:398b:a7b:28df:5934:68e0:2]:22 (DNS: [fdaa::3]:53)
[ 2.127210] reboot: Restarting system
machine did not have a restart policy, defaulting to restart
INFO Starting init (commit: 0b28cec)…
INFO Preparing to run: docker-entrypoint.sh npm run start as root
INFO [fly api proxy] listening at /.fly/api
2023/06/16 17:44:02 listening on [fdaa:2:398b:a7b:28df:5934:68e0:2]:22 (DNS: [fdaa::3]:53)
my_portfolio@0.0.0 start
src/main.jsx
src/main.jsx: 1: import: not found
src/main.jsx: 2: import: not found
src/main.jsx: 3: import: not found
src/main.jsx: 4: import: not found
src/main.jsx: 6: Syntax error: word unexpected (expecting “)”)
INFO Main child exited normally with code: 2
INFO Starting clean up.
WARN hallpass exited, pid: 514, status: signal: 15 (SIGTERM)
2023/06/16 17:44:03 listening on [fdaa:2:398b:a7b:28df:5934:68e0:2]:22 (DNS: [fdaa::3]:53)
[ 2.128541] reboot: Restarting system
machine did not have a restart policy, defaulting to restart
Error: smoke checks for 148e265a709078 failed: the app appears to be crashing

Hi,

Based on the logs it looks like there are a few issues with the app preventing it from running. It complains about imports not found, and a syntax error, before exiting.

I’d suggest making sure it runs locally before deploying it. That way you can narrow down where the problem is. If it includes a Dockerfile, I’d try building and running that locally (assuming you have Docker installed and running … if not you can get it for free from Download Docker Desktop | Docker). Then deploy it (as Fly would build the same image). If there is no Dockerfile, running it locally should at least let you debug any syntax errors.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.