-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
Uncaught (in promise) TypeError: Cannot read property 'protocol' of undefined #118
Comments
I messed up in the code. Everything works fine now. |
Would you mind sharing what you did wrong for future reference? |
Actually, I can not even reproduce the error now. |
I got this error from:
So I guess the error is related to an argument being undefined. I'm surprised that isn't a syntax error. |
I also meet this question.But I also can send get and post request. |
Any solution? I am also using it with Any ideas greatly appreciated! |
@vpiskunov Maybe it's because you are using the origin axios, not a vue plugin, you should use Vue.prototype.$axios = axios if you want vue's instance to call it |
I was getting this error due to the url being undefined. Was fixed after I addressed that issue. |
I got same problems guys, but I'm not using Vue. |
@rohmanhm That's because the Ajax request runs on a separate isolated "thread"-like environment. You might have some luck by calling .bind(this) or .bind(window) |
@vpiskunov would you give me some example? |
I am also using it with Vue.use(axios) |
If you use vue or another just import axios from 'axios' And use Axios normally without using Everything works fine |
Hey, when I write Vue.use(axios); in main.js I get "Uncaught ReferenceError: axios is not defined" error and it dows not change when I delete it. How can I solve this problem? Thanks in advance! |
If you use: The error occurs |
Using Laravel VUE JS, I experienced this same issue. This fixed it for me however - |
i solved my own with deleting Vue.use(axios) |
this work for me,thank you |
Same here. I'm not using axios, though. |
This worked for me. |
Same here don't know why tho. |
I think it was mentioned in an earlier comment by @rookiebulls , I am using Axios as a plug-in via Vue.use(VueAxios, axios) and what worked for me was calling axios from the Vue context by using Vue.$axios . |
thanks! This worcked for me!! |
install both of axios and vue-axios import axios from 'axios' Vue.use(VueAxios, axios) that's worked for me |
my issue for this problem:
|
I solved it by removing the import in my main.js file. |
Had the same error with bootstrap form. |
GuyyyyyyyyyyyyyyyyyyyyyyyyyYYYYYYYYYYYYYYYYYYYYYYYYYYYyyyyyyyyyyyyyyyyyyyyyyyyyyyS just use this 4 line code and DONE ! import Vue from 'vue' Vue.use(VueAxios, axios) . |
I faced this in React.js and no solution |
Hi!
I'm trying to use your library but I get an error:
I was using your example
The error happens here.
I'm using browserify and chrome 45.
The text was updated successfully, but these errors were encountered: