-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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 v0.27.0 uses node polyfills provided by webpack, which are removed from webpack v5 #4623
Comments
I also encountered this problem, but it was solved by simply installing a "url" dependency, as suggested. I was particularly shocked. |
I think it's this line inside xhr.js that didn't exist in v. 26 |
yes! |
that indeed works but is not an appropriate solution. either axios should re-bundle it in their package or there should be a better workaround. |
Fixing this right now |
This should be reopened I think. The follow-redirects dependency also depends on the default webpack < 5 polyfills. Which are not present anymore. I think Line 10 in 13dd93f
Also see browser usage in their readme file: https://www.npmjs.com/package/follow-redirects |
@KyorCode can you please put in a pull request for this? |
Describe the bug
I'm using axios in an app created by create-react-app. As soon I upgraded axios to v0.27.0, the application stop working with the error shown in the reproduction section. Downgrading to v0.26.1 solved the issue.
It looks like the issues rises from the xhr adapter.
To Reproduce
Create an empty project using CRA
npx create-react-app my-app cd my-app
install axios
use axios to make any request
start the application
The error is shown in the console
Expected behavior
That it works, or at least there are instruction to install the dependencies in the documentation.
Environment
Additional context/Screenshots
None
The text was updated successfully, but these errors were encountered: