You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
More detailed error from a Next.js app, API route:
[AxiosError: There is no suitable adapter to dispatch the request since :
- adapter xhr is not supported by the environment
- adapter http is not available in the build] {
message: 'There is no suitable adapter to dispatch the request since :\n- adapter xhr is not supported by the environment\n- adapter http is not available in the build',
name: 'AxiosError',
code: 'ERR_NOT_SUPPORT'
}
Next.js edge runtime does not support full Node.js API. In particular, it doesn't support http module. It does support Fetch API though: https://nextjs.org/docs/app/api-reference/edge.
Just ran into this - a potentially quicker fix could be to use this adapter that I have used with other libraries that rely on Axios, however would require some work to either pass the adapter in or expose the Axios object.
The text was updated successfully, but these errors were encountered: