TypeScript
import sdk, { ID, Permission, Role, Databases, Query } from "node-appwrite";
import {PUBLIC_API_ENDPOINT, PUBLIC_PROJECT_ID, PUBLIC_API_KEY, } from '$env/static/public'
// Init SDK
const client = new sdk.Client();
const databases = new sdk.Databases(client);
const collectionId = databases.listDocuments(
'64502243369b884d71f8',
'647295a5228d3bd685da',
[
Query.select("accountId", accountId)
]
);```
`attributes.map is not a function error`
I got this error when I changed `Query.search("accountId", accountId)` to `Query.select("accountId", accountId)`
TL;DR
The user encountered an error with the message "attributes.map is not a function". They were using the Appwrite SDK and had made a change in their code from `Query.search("accountId", accountId)` to `Query.select("accountId", accountId)`. The user later resolved the issue.NVM I Got it
[SOLVED] attributes.map is not a function error
Recommended threads
- Second application got bricked after 1.7...
A few days ago I created this post https://discord.com/channels/564160730845151244/1072905050399191082/threads/1435303434495594698 where after the migration to ...
- Message: Invalid document structure: Unk...
Hi, I Restored my appwrite database and im facing this error.. im not able to do anything ``` [Error] Timestamp: 2025-11-09T11:59:47+00:00 [Error] Method: POS...
- DATA LOSS when using DB Operators in tra...
I'm using Appwrite Cloud with TablesDB. Calling updateRow with DB operators work as expected: ```ts await databases.updateRow({ databaseId: 'db-id', tableId...