Back

[Sovled] appwrite sdk client is fine but when using node-appwrite query error

  • 1
  • Self Hosted
  • Tools
  • Web
  • Databases
Suiii
28 May, 2024, 12:06
TypeScript
 queries.push(Query.limit(params.pageSize!));
    queries.push(
      Query.offset(getOffsetSize(params.pageNumber!, params.pageSize!))
    );

error log

TypeScript
2024-05-28T12:04:35.101786738Z [Error] File: /usr/src/code/vendor/utopia-php/framework/src/App.php
2024-05-28T12:04:35.101789696Z [Error] Line: 574
2024-05-28T12:04:44.143455182Z [Error] Type: Utopia\Exception
2024-05-28T12:04:44.146939930Z [Error] Message: Error handler had an error: Invalid query: {"method":"limit","values":["8"]}
TL;DR
Developers were encountering a query error when using node-appwrite despite having a fine appwrite SDK client. The issue was resolved by ensuring the npm install and cloud configurations were correct, with appwrite version 1.5.3 and node-appwrite version 12.0.1. The error log indicated an "Invalid query" problem related to the limit method, which was fixed by adjusting the query parameters.
Suiii
28 May, 2024, 12:22

node-appwrite: 12.0.1

Suiii
28 May, 2024, 12:23

appwrite: 1.5.3

Suiii
28 May, 2024, 12:23

selfhosted

Suiii
28 May, 2024, 12:23

cloud is also same

Suiii
28 May, 2024, 12:25

[Sovled] npm install

Suiii
28 May, 2024, 12:25

[Sovled] appwrite sdk client is fine but when using node-appwrite query error

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