-
-
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
The provided value 'stream' is not a valid enum value of type XMLHttpRequestResponseType #1474
Comments
I'm getting this exact problem. |
@nbcnc I figured it out, your making an electron app like me. seems you can only get the response.data as a stream in the main thread. What I did to fix this was add ipcRenderer.send("download"); // in render thread then in the main thread app.on("ready", async () => {
mainWindow = new BrowserWindow({
show: false,
width: 1024,
height: 728
});
mainWindow.loadURL(`file://${__dirname}/app.html`);
ipcMain.on("download", (event, arg) => {
// axios download code here
}); good luck |
I'm getting the same error, I'm using it in a rect-native application. |
Getting this in the browser, compiled using CRA (webpack) |
I am getting this in simple node app |
@bintoll Are you using jest? If so, that's probably the issue...see this comment: #1418 (comment) |
For electron users, try this from the render process:
This forces axios to use the node adapter. See #552 |
I'm getting this error in web using Vue.
|
Got same error in React App |
For React , try using this in https://github.com/axios/axios#request-config
check for the data in progressEvent.currentTarget.response |
This issue is still happening, is there any other way to get streams through axios? |
As far as I know, |
someone may still tips error with I found that when we require In axios's package.json, i found this code It seems like in electron 5+, webpack will replace http to xhr in render. I delete axios's package.json code i mentioned. 'require('axios/lib/adapters/http')' works. |
I also have exact same error. Two years and no response doesn't look promising. |
Summary
I literally copied and pasted the "stream" example and I get the following error:
Context
The text was updated successfully, but these errors were encountered: