-
Notifications
You must be signed in to change notification settings - Fork 11
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
"Thwack: Invalid options object during request." on simple GET #30
Comments
I suspect this is because I'm trying to use this in an npm module myself and I'm running it through a terminal window. https://github.com/donavon/thwack/blob/master/src/default/index.js#L4-L6 This code would seem to suggest that you're only catering for this being used in a browser, given it's the lack of |
Search the readme for nodejs. If you’re trying to use this in node, you must import it like |
Unfortunately that doesn't work if you are using Typescript. I end up with an import error. Same applies if I were to use Also, and this might be a noob question, if I do end up changing it to use |
You can always set fetch yourself. If you look at import thwack from 'thwack';
import fetch from 'node-fetch';
thwack.defaults.fetch = fetch; |
When performing a simple GET call, I'm getting the following error message
"Thwack: Invalid options object during request. Check your event callbacks."
Code looks like this:
Repro project can be downloaded here: thwack-test.zip
The text was updated successfully, but these errors were encountered: