-
-
Notifications
You must be signed in to change notification settings - Fork 11k
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
ReferenceError: TextEncoder is not defined in axios >= 1.3.0 #5529
Comments
You are probably using node.js older than |
Using Node v18.13.0 and having the same issue. |
@JanHamara Just tested on 18.12.1 import axios from 'axios';
const form = new FormData();
form.append('foo', 'bar');
const {data} = await axios.post('http://httpbin.org/post', form);
console.log(process.version, axios.VERSION, data);
|
v18.12.1 Working fine in 1.3.1 also @JanHamara |
Hi, I'm using axios 1.5.1 with node version v18.16.0 and still have the issue. |
Guys, turns out it fails if you use |
I have the same problem when using Vite version 5. Vite 4.5.3 works. 🤷♂️ |
this issue was introduce back in v1.7.0 |
Describe the issue
Hi,
I've encountered problem after upgrading axios to version 1.3.0.
In my tests, below error has shown up:
ReferenceError: TextEncoder is not defined
at Object. (node_modules/axios/lib/helpers/formDataToStream.js:7:21)
I saw release notes but I didn't find any breaking changes.
Is it a bug?
In version 1.2.6 this error does not exist.
Example Code
No response
Expected behavior
No response
Axios Version
No response
Adapter Version
No response
Browser
No response
Browser Version
No response
Node.js Version
No response
OS
No response
Additional Library Versions
No response
Additional context/Screenshots
No response
The text was updated successfully, but these errors were encountered: