Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

realFetch.call is not a function #94

Closed
ghost opened this issue Sep 11, 2023 · 1 comment · Fixed by #99
Closed

realFetch.call is not a function #94

ghost opened this issue Sep 11, 2023 · 1 comment · Fixed by #99

Comments

@ghost
Copy link

ghost commented Sep 11, 2023

The client doesn't work in AWS lambda environment, runtime is Node.js 18.

A call like:

let batcherVectors = client.batch.objectsBatcher();
...
await batcherVectors.do();

crashes with the following error:

| TypeError: realFetch.call is not a function
| at d (.../chatbot/aws/node_modules/.pnpm/[email protected]/node_modules/isomorphic-fetch/fetch-npm-node.js:8:19)
| at Object.post (.../chatbot/aws/node_modules/.pnpm/[email protected][email protected]/node_modules/weaviate-ts-client/dist/index.mjs:1:5955)

This seems connected to the old issue of isomorphic-fetch:
matthew-andrews/isomorphic-fetch#194

Would be nice to use a real fetch in supported environments, like node.js 18 or give us an option to provide a fetch client via parameter to weaviate client.

@tsmith023
Copy link
Contributor

tsmith023 commented Sep 21, 2023

Hi @alexylabs, I'm afraid that we're currently deep into a developmental sprint on the Python client so there isn't the bandwidth to fix this issue. I like your idea of having the option for a user-provided fetch client but we'd have to be wary of potential security issues associated with this in browser environments. Since Node16 is deprecated, simply using fetch now instead of isomorphic-fetch is the most likely candidate but axios may also be useful since it is now v1

However, since this is likely a large refactoring effort that requires some consideration, it will have to wait until we are able to focus more on the TypeScript client in depth. I'm sorry that your use-case is not supported! I hope it will be soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant