Back

TypeError: os.type is not a function at new _Client (node-appwrite.js?v=050b1c09:2391:57)

  • 1
  • Web
Areeb
9 Jul, 2024, 05:13

im getting this error when trying to configure node sdk

TL;DR
Developers encountering "TypeError: os.type is not a function" while using Appwrite Web SDK or Node SDK with API key and facing 401 unauthorized error when listing documents without user login. Cloud version 13.0.0. Query about whether user needs session even with "any" permission. Error persists when switching to Node SDK. Need clarity on configuration and versions used. Solution: The error may be due to misconfiguration. Check Appwrite documentation for the correct setup with Node SDK.
darShan
9 Jul, 2024, 05:20

what version?

darShan
9 Jul, 2024, 05:38

latest is 13.0.0, you are using Cloud, right? also, could you link the docs that mention 11.1.1?

Areeb
9 Jul, 2024, 05:50

I’m using this

Areeb
9 Jul, 2024, 05:50

Is there something I’m missing?

Areeb
9 Jul, 2024, 05:56

I have a few queries though: Ive just started my project and thought of using BaaS. I picked the Web sdk Something i wanted to do is list all documents of a collection without the user being logged in, but the roles of the collection require “all users” the “read” permission.

I tried using the “any” in the permissions but on running the query for listing the documents I’m getting error 401 unauthorised, I implemented an api key in it but got the type.os error. Does the user still need to have a session ?

Then I thought of switching to a node sdk with an api key but this same error again.

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