When writing the vue project interface today, there was an Uncaught (in promise) error error.
I took a closer look, the interface is ok,
Me where the problem seems to have nothing, why the console which will be reported this wrong?
Later I found out that I did not write catch and he forcibly threw the error, so I changed the code to the following.
But after the change, it did not report the Uncaught (in promise) error error, and the other errors were reported, and a bunch of such errors were reported ↓
Reported so many mistakes, almost forced me. (But don’t panic, raise Erlang’s legs, drink a glass of water, and continue to look down)
.catch(err=>{
this.$message.error(err.message);
console.log(err);
})
Just write message after err.
Read More:
- How to Solve Uncaught (in promise) Error (Two Solutions)
- Vue Error: Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location
- Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to crrent location: “/home“
- [Solved] Uncaught (in promise) Error: Avoided redundant navigation to current location:
- [Solved] Uncaught (in promise) DOMException: Failed to load because no supported source was found.
- [Solved] Uncaught (in promise) TypeError: XXX.a is not a constructor
- ArcGIS API for JavaScript Error Uncaught(in promise): TypeError: xxx is not a constructor
- [Solved] Turf.js error: uncaught (in promise) error: the solution of invalid unit
- [Solved] Echarts Error: Uncaught (in promise) Error: Initialize failed: invalid dom.
- request.js?b775:101 Uncaught (in promise) Error: Failed to convert value of type ‘java.lang.String’ to required type ‘java.lang.Long’;
- [Solved] echarts Draw Errror: echarts-d9fd185e.js:31447 Uncaught (in promise) Error: Initialize failed: invalid dom.
- [Solved] Vue Error: Error in v-on handler (Promise/async): “[object object]“
- Solve the problem of repeatedly clicking the same route console in Vue to report an error
- Vue Error: Error in v-on handler (Promise/async): “Error: Error“
- VueUncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: “/
- [Solved] Vue Error: Uncaught TypeError: Vue.createApp is not a function
- [Solved] Vue Route Error: Uncaught TypeError: (0 , vue__WEBPACK_IMPORTED_MODULE_42__.defineComponent) is not a function
- Vue: How to Solve Eslint error
- VUE: How to Solve NPM Always Install Error
- How to open a page in a new window by Vue router