-
-
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
🐛 [BUG] - TypeError: axios.defaults is undefined in v 1.1.0 #5044
Comments
Same here. 1.0.0 didn't have this problem, but #4999 was a show stopper for us. In 1.1.0, I think this another problem introduced by #5030
|
It looks like the default is no longer the default. As a workaround, you can explicitly use it; note the change in the
|
Probably? Line 3760 in 9c3dce3
We downgrade to @1.0.0. and it seems fine. |
I think it's this commit: 819ad75 |
Issue still persists even with release 1.1.2 |
axios.defaults.headers.common , |
Fixed for me in 1.1.2. |
Still facing the same issue with the 1.1.2 release. |
For those following the CommonJS change suggested in README by adding |
It works, withouth TypeScript typings |
It works with |
This problem persist for me. For some reason, when compiling typescript to javascript, it adds a "default" after axios... and terminal is complaining that axios.default is undefined. |
Seriously... I've been fighting with this for 3 hours thinking I was messing up something |
Any fix for this until the new version is released? |
Not an ideal way to fix this but after compiling, remove ['default'] from where it's on any axios request and the compiled ['default']-free file will run properly. |
Description
I use CDN with
https://unpkg.com/axios/dist/axios.min.js
without specify version in my project, and before new version release, I can work it well.But after new version release, it will show the error:
I tried to find some release notes or upgrade guide but I saw someone find them too, so I rollback to old version, and it works now!
But I have several pages needs to rollback the version 😢
Is rollback version only way to fix this error?
Code
I used axios with Vue.js, and this is the part in my Vue app:
The text was updated successfully, but these errors were encountered: