Back

[SOLVED] attributes.map is not a function error

  • 0
  • Self Hosted
  • Databases
  • Web
BloodThermic
28 May, 2023, 21:35
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.
BloodThermic
28 May, 2023, 22:01

NVM I Got it

BloodThermic
28 May, 2023, 22:01

[SOLVED] attributes.map is not a function 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