adapter is not a function (EDIT: after 1st request)
See original GitHub issueEdit:
I originally thought this was only happening in the DELETE request. It turns out that any request after the first request fails . So if I send the POST and then the POST again, the 2nd time it fails.
TypeError: adapter is not a function
at dispatchRequest (dispatchRequest.js:52)
at async http:/localhost:3004/launchpad/static/js/205.chunk.js:537
–
Hi there
In the same page we have several calls to axios.get
, axios.post
and those work fine.
But using axios.delete
I’m getting a weird error
adapter is not a function
I inspected into axios’ code and found that effectively, defaults.adapter
is undefined
Weird thing is that in other verbs (get, post), adapter is a function (I think is xhrAdapter or something like that)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:22
Top Results From Across the Web
TypeError: adapter is not a function error when using axios ...
I've tried using node-fetch and axios and neither is working for me. My webpack.common.js file looks like this: const path = require("path"); ...
Read more >Debug Adapter Protocol - Microsoft Open Source
The Debug Adapter Protocol defines the protocol used between an editor or IDE and a debugger or runtime. A machine-readable JSON schema can...
Read more >Troubleshoot invocation issues in Lambda
Invocation errors can be caused by issues with request parameters, event structure, function settings, user permissions, resource permissions, or limits. If you ...
Read more >A device driver is not installed or a hardware device does not ...
Resolution · Step 1: Determine whether the device driver is found in Device Manager · Step 2: Uninstall and reinstall the device drivers...
Read more >Writing middleware in #golang and how Go makes it so much ...
Our Adapt function will simply iterate over all adapters, calling them one by one (in reverse order) in a chained manner, returning the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
XMLHttpRequest is not defined
I’ve had the same problem. But my problem was, that I tried to use Axios inside of a service worker. Unfortunately that doesn’t work since axios can’t work inside of a worker, because of: https://github.com/axios/axios/issues/1219 So the above solution didn’t work (obviously)