Vue packages version mismatch

First, the problem

After I installed the latest cli, when you try to create a project, on the error, vue and version vue-template-compiler is not uniform.

// install VUE @ / cli 
npm i -g @ VUE / cli // create 
vue create demo1

 

 

Checked the relevant solutions, said that the two versions configured the same.

// So he first vue upgrade, 
npm install [email protected] - the Save
 // and then proceed to create a 
vue the Create demo1
 // discovery is still being given, so they try to vue-template-compiler downgrade 
npm install vue-template- [email protected]

Fiddle fiddle to go, has been reported the same mistakes. Then went folder looked and found vue in the package-lock.json file version, and vue-template-compiler is consistent. Then suddenly saw a post of saying "I do not have vue installed globally", I think of it I installed a global "npm install -g @ vue / cli"

All global and so will vue vue-template-compiler installed, the problem is solved.

npm install [email protected] -g --save
npm install vue[email protected] -g --save

 

Guess you like

Origin www.cnblogs.com/songForU/p/11573608.html