Uncaught (in promise) TypeError: Cannot read property 'protocol' of undefined
See original GitHub issueHi!
I’m trying to use your library but I get an error:
Uncaught (in promise) TypeError: Cannot read property 'protocol' of undefined
I was using your example
axios.get('https://api.github.com/users/benjamingeorge')
.then(function (res) {
console.log(res.data);
})
.catch(function(res) {
if(res instanceof Error) {
console.log(res.message);
} else {
console.log(res.data);
}
});
The error happens here. I’m using browserify and chrome 45.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:15
- Comments:30 (1 by maintainers)
Top Results From Across the Web
Cannot read property 'protocol' of undefined - Stack Overflow
This error occurs when something goes wrong in request, for ex. if you set url as undefined, invalid method, or invalid content type, ......
Read more >TypeError: Cannot read property 'protocol' of undefined #632
i've an error, and i can't solved it alone :) my error message is : TypeError: Cannot read property 'protocol' of undefined at...
Read more >Cannot read property 'protocol' of undefined - Get Help
I have an error trying to move the request URL into a separate file called service.js If i make the request directly in...
Read more >Cannot read property 'protocol' of undefined using axios with ...
Coding example for the question Why do I have TypeError: Cannot read property 'protocol' of undefined using axios with vue?-Vue.js.
Read more >React Js: Unhandled Rejection (Typeerror) - ADocLib
I'm trying to use your library but I get an error: Uncaught in promise TypeError: Cannot read property 'protocol' of undefined. I was...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Actually, I can not even reproduce the error now.
If you use vue or another just
And use Axios normally without using
Vue.use(axios)
Everything works fine