Skip to content

How do you use the SDK from node? #272

Answered by ganigeorgiev
ollema asked this question in Q&A
Discussion options

You must be logged in to vote

This looks similar to #258. Try changing the SDK backend url to an ipv4, eg:

const pocketBaseUrl = 'http://127.0.0.1:8090';

The reason this could resolve the issue is that go dns resolver (and most likely in other languages too) by default will first try to resolve to IPv4 then IPv6 addresses, while in Node17+ for some reason this is the opposite - IPv6 first, then IPv4. I'll try to improve the SDK error reporting in future versions.

Let me know if the above doesn't work for you and I'll investigate it further.

btw. The next v0.4.0 release (sometime next week) will add support for export/import of a collection schema via an API endpoint and the Admin UI. Additionally, when PocketBase is u…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ganigeorgiev
Comment options

@ollema
Comment options

Answer selected by ollema
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants