-
Notifications
You must be signed in to change notification settings - Fork 26.1k
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
axios & middleware error - adapter is not a function #30932
Comments
I have the same problem. |
Probably the thing that is happening there is Why not just use |
After investigation, we determine what is happening is axios delegates into I recommend you to use native fetch or ky in case you want some sugar syntactic over fetch API. |
- Drop axios vercel/next.js#30932 - Using fetch's json method causes isPlainObject check to fail https://github.com/vercel/next.js/blob/c88898be120bf598958438b9bc07cc6fe6c4636a/packages/next/lib/is-serializable-props.ts#L13
- Fixed blocker with sources in src/ directory and using experimental features - Drop axios vercel/next.js#30932 - Using fetch's json method causes isPlainObject check to fail https://github.com/vercel/next.js/blob/c88898be120bf598958438b9bc07cc6fe6c4636a/packages/next/lib/is-serializable-props.ts#L13
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What version of Next.js are you using?
12.0.2
What version of Node.js are you using?
14.16.0
What browser are you using?
Microsoft Edge (Chromium)
What operating system are you using?
Windows
How are you deploying your application?
next dev
Describe the Bug
Unable to call axios from middleware.
When I do, I receive the following error:
I also tried this with
next@canary
, but it also has the same issue.Expected Behavior
Http Request from Axios should go through
To Reproduce
The text was updated successfully, but these errors were encountered: