
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 ?

if you run a demo/bare-bones function, does it work? Also, express might just not work on functions. Also, Cloud or Self Hosted?

thanks for helping ou, and yes this is gonna be Cloud hosted and yeah i just tried a bare-bones project with just node + typescript to see if it works, and it worked locally but in appwrite the same issue presented again.
this is my sever.ts
import { createServer } from 'http';
const server = createServer((req, res) => { res.statusCode = 200; res.setHeader('Content-Type', 'text/plain'); res.end('Hello from a barebones Node.js + TypeScript project!'); });
const PORT = process.env.PORT || 3000;
server.listen(PORT, () => {
console.log(Server running at http://localhost:${PORT}/
);
});
and this is my package.json
{ "name": "barebonesNode", "version": "1.0.0", "main": "dist/server.js", "license": "MIT", "scripts": { "build": "tsc", "start": "node src/server.js" }, "dependencies": { "@types/node": "^18.0.0", "typescript": "^5.6.2" } }
so, i dont think the issue is with express, since i am not using it in this bare-bones project - maybe it's typescript ?
the error was this as before on Appwrite
Synchronous function execution timed out. Use asynchronous execution instead, or ensure the execution duration doesn't exceed 30 seconds.
@darShan

i dnt think express would work on appwrite.

Recommended threads
- Issue with Appwrite Function Execution –...
Hi all, I'm encountering an issue when calling an Appwrite function from my Flutter app. **Environment:** ```Flutter SDK: 3.27.3 Appwrite Flutter SDK: 16.1.0```...
- Accessing caller UserID on Function Exce...
I'm working with function, which should generate a document in Collection B, but only if user who's calling the function, is the owner of Document in Collection...
- Steps to Enable HTTP Access to appwrite ...
Hi Appwrite team, I have created a function and I want it to receive and incoming post request from a webhook( a webhook that notifies the function to update t...
