Skip to content
Back

Route not found. Please ensure the endpoint is configured correctly

  • 0
  • Web
  • Cloud
Aditya
2 Oct, 2025, 17:19

I am using node-appwrite sdk for database operations when i run it locally everything works but after deploying it on appwrite sites nextjs app the database operation does not works this is my setup

export async function createAdminClient() { const client = new Client() .setEndpoint(process.env.NEXT_APPWRITE_API_ENDPOINT) .setProject(process.env.NEXT_PUBLIC_APPWRITE_PROJECT_ID) .setKey(process.env.APPWRITE_API_KEY);

TypeScript
const { tableDB } = await createAdminClient();

const savedOrder = await tableDB.createRow({ databaseId: config.databaseId!, tableId: config.tableId!, rowId: ID.unique(), data: order, });

I am using node 22 same is configured on appwrite sites as well "node-appwrite": "^19.0.0",

ENV of local and prod is exactly same on appwrite sites still facing issue , any help or suggestion would be helpful

headers":{"x-sdk-name":"Node.js","x-sdk-platform":"server","x-sdk-language":"nodejs","x-sdk-version":"19.1.0","user-agent":"AppwriteNodeJSSDK/19.1.0 (linux; x64) Node.js/22","X-Appwrite-Response-Format":"1.8.0",

TL;DR
Issue: Route not found when trying to run database operations after deploying a Next.js app using the node-appwrite SDK on Appwrite sites. Solution: Double-check the endpoint configuration and ensure it matches the environment variables of the local and production setups. Make sure all dependencies are correctly installed.
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