vue-router click on the menu bar with a module error ---- Uncaught (in promise) NavigationDuplicated error .......

In doing bottom end mobile navigation, mouse double-click each option will be reported as an error, but will not have any problem when you click.

The reason for this bug is vue-router version, more vue-router 3.0 version callback form is in the form of promise api, return a promise, if not caught the error, the console is always a warning appears on the map;

The solution may be to install a previous vue-router or capture thrown into error; 

Solution probably include the following three kinds of solutions:

1) Delete node_modules folder, and then use the "cnpm install" to reinstall the dependent (ps: attempt failed !!!)

2) run under the project directory cnpm i [email protected] -S(ps:尝试失败!!!)

3) Add the following lines of code (ps at main.js src directory of the project file folder's: successfully solved the problem !!!)

 

PS: Some bug may only meet once in a lifetime! Fortunately, experience has gone up!

Guess you like

Origin www.cnblogs.com/sherryStudy/p/bug.html