vue-cli2 exist and vue-cli3

https://blog.csdn.net/Jioho_chen/article/details/90455778

 

and the win vue-cli2 vue-cli3 coexist, use with
start a view contents slowly compiled


Article directories
win under vue-cli2 and vue-cli3 coexist used with
the installation vue-cli version of the
test installation was successful
modification vue2 vue3 name and
configuration environment variable
open environment variable is the location of
New System Variable
Last Modified Path variable
last. Restart the computer on the list
written in the last
vue2 and vue3 command, representing vue-cli2 and vue-cli3 operating environment, it can simultaneously on a single computer coexist, use, and most importantly, do not install the C drive!

That way you can use this article if you already have a version of vue installation, append a version

Sao operation begins:

Since you want to install two versions of vue, it is certainly in order to download the corresponding version of the first two, my computer is not vue environment installed, so here I just anywhere in the F drive, install vue2 and vue3

Installation vue-cli version
installed the latest version of vue-cli3
careful not to add -g added that the global installed
vue-cli3 I was installed in vue3 folder under
execution:

npm install @vue/cli
1


Installation vue-cli2.9.6 version
installed 2 is the same reason I left the folder in the following vue2

carried out:

[email protected] install npm
1
course, you can also specify the version you want

 

Verify that the installation was successful
after installing vue-cli, it will have a node_modules folders in the current directory. This is a partial installation module vue required documents

So how to test it:

vue-cli3 test

Executed in vue3 catalog:

-v ./node_module/.bin/vue
1
It should be noted that
not to use cmd. At least. Conveniently find a command-line tool. .

 


See the results are OK. They show the corresponding version number. Here it shows vue-cli2.x and vue-cli3.x locally installed successfully

Change the name of vue2 and vue3
Next, find the installation directory of vue, then find and vue.cmd vue position. It was renamed vue2 vue2.cmd and vue3 vue3.cmd
directories and file names corresponding to not make a mistake

 

 

 

Configuration environment variable
short of the last step, configure finished.
Before tossing so much vue installed version - modify the file names are for this step

Open environment variable location
Right My Computer - Properties - Advanced System Settings - Environment Variables


New system variables
corresponding to the input variable name and file directory
directory here is that we vue installation directory, and find the .bin folder on it.
vue2 and vue3 not confused. Figure good understanding

 

 

Last Modified Path variables
This step is the most important
first find the Path of position (this is not new, each computer has a), then edit

 

Under win10 computer, double-click in the blank field directly, then fill in the variable names we have just set up, wrapped in attention %%

 

If not win10 computer
editor Path of the time. The final surface can be moved to the input box path
and enter;% VUE_CLI2%;% VUE_CLI3%
[focus] win10 following computer environment variables are; separate, so do not leak

At last. Restart the computer on the line
after modify environment variables, restart the computer to take effect.

If you go in accordance with the process. That last entered vue2 and vue3 I can see the effect at the beginning of the graph. It means that your computer vue2.x and vue3.x versions exist, and can be a global call!

Written in the last
several important variables are what life?
We were vue2 vue3 actually determines the final name of our global vue in front of the modified file name. Of course, you can also change the other to your file names prevail!

Set the environment variable when VUE_CLI2 and VUE_CLI3 what about you?
No, in fact, to find the file path Path where it vue

Set VUE_CLI2 and some just choose to remember VUE_CLI3 .bin directory. The rest of the system will automatically go to find the file name of the corresponding
----------------
Copyright: Original article is CSDN blogger "Jioho_", and follow CC 4.0 by- sa copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https: //blog.csdn.net/Jioho_chen/article/details/90455778

 

Guess you like

Origin www.cnblogs.com/weizaiyes/p/11368802.html