I am using / importing uplink-nodejs in my sveltekit application, but getting an error upon import:
import storj from "uplink-nodejs";
Now there is some information on the github page: GitHub - storj-thirdparty/uplink-nodejs: NodeJS / typescript bindings for libuplink
But I am confused about which of these steps is actually for using it and which are for development.
What also irritates me, is, that I have to export environment variables in bash, because that would mean I can’t use this library client side. Is that true?
If not, can you point me in the right direction?
If by client-side you mean in a browser, no, this toolchain builds C libraries that are called into from node and needs the corresponding environment. Can you confirm you went through the steps in the README to setup the environment? The env vars you mentioned are just to support the build and linking.
The error you’re sharing indicates that that library on your mac was not built successfully.
Oh, that would mean if I want to build an app which has several thousand users wanting to store files themselves, I have to proxy all the upload traffic through my server? That’s a more than a little inconvenient
I think that resolves my question…
Thanks for your answer anyway @utropicmedia-karl !
Happy to help.
It would entirely depend on your requirements and deployment constraints. You can also use the S3 protocol with the AWS SDKs to connect to storj dcs. If it’s a mobile app, you can embed the native storj libs into the app.