Back

Node(Express) backend deployment issues

  • 0
  • Functions
Slayer
17 Sep, 2024, 20:52

Hey folks,

I’m hitting a wall with deploying my Node.js 18 app (using Express and TypeScript) to Appwrite. This is my first time with Appwrite and backend stuff, so I’m a bit stuck.

Here’s the Setup Stack: Node.js 18, Express, TypeScript Build Command:

yarn install --production=false && yarn build && node fix-extensions.js && yarn install --production --frozen-lockfile && node dist/server.js

First, install everything (yarn install --production=false).

Then build the app (yarn build).

Run a script to fix import extensions (node fix-extensions.js).

Reinstall just the production dependencies (yarn install --production --frozen-lockfile).

Finally, start the app (node dist/server.js).

so I am putting the entry point as dist/server.js as well in this case

The Problem When I deploy, I get these errors:

Initial Error:

{"message":"Runtime not ready. Container not found.","code":500,"version":"0.6.10"} This happens almost right away.

Timeout Error:(second error)

{"message":"Synchronous function execution timed out. Use asynchronous execution instead, or ensure the execution duration doesn't exceed 30 seconds."} After the first error, it seems like the deployment just times out(after 30 minutes of building ?) .

Everything works perfectly on my local setup, so it seems like it’s an Appwrite-specific issue? or i am not sure ? anyone has any ideas ?

TL;DR
Developers encountering deployment issues with Node.js 18 app running Express and TypeScript on Appwrite. App fails with "Runtime not ready” and “Synchronous function execution timed out” errors. Appwrite-specific issue suspected. Solution: Review and potentially revise deployment process or investigate Appwrite-specific compatibility.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more