Vue --version solve problems when installing or vue vue is not an internal command

1. attempt vue global configuration environment variable to find the path vue.cmd, and then configure it.

    Question: In file search, did not find vue.cmd, failed.

  1.npm above sea level and -g

    Global update the version of npm, as 5.xx

  2.npm she vue-cli -g

    At this point, enter vue --version check for the version number, if not, continue to the next step, if you can, the problem is solved

  3.cnpm i vue-cli -g

    vue.cmd file appears, the path is: C: \ Users \ ada \ AppData \ Roaming \ npm \ vue.cmd

  Finally, execute in cmd: vue -V, the version number of 2.9.2 appear to solve the problem.

Guess you like

Origin www.cnblogs.com/liwids-blog/p/11785164.html