After reinstalling node.js, the previous vue may have uninstallation residue. Just search for vue.cmd on the computer and
delete it. After deleting, enter the following command
npm install vue -g
npm install vue-router -g
npm install vue-cli -g
Now you can use vue normally