Open JarnoRFB opened 1 year ago
yes, like it's mentionned on the documentation, there is no support for fetch on backend in zodios v10. If you can wait a little, zodios v11 will have native support for fetch on backend starting with node version 18.
Thanks for the update! My confusion was rather that I only wanted to use pluginToken
but got errors from the fetch plugin. But since Node 18 is already LTS and will include the appropriate fetch types, it probably makes sense to just push people to upgrade.
oh, that's one thing i did not think about. yes, the plugin token should work on backend and that is bad that zodios requires you to be compatible with fetch.
Maybe i should create more fine grained exports in plugins packages, like import { pluginToken } from '@zodios/plugins/token'
, this should allow you to not rely on fetch plugin types when importing token plugin.
i'll keep this opened and try to come with a fix for this.
First of all thanks for the great
zodios
library!I am running node and using zodios in the backend.
After
npm i @zodios/plugins
and importingI get the following errors from
tsc
The errors went away after adding
to
tsconfig.json
, but it seems a bit weird that I should have to add this to my backend. Is there any workaround for this or would it be an option to separate the plugins that should only be used for the browser into a separate package?