Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update Vuetify version

To update the Vuetify component library in my project, I changed the version in package.json and ran the command npm install. Vuetify is now removed from the node_modules folder. How should I install it again? Why does npm install Vuetify not bring it back into node_modules?

like image 322
HoseinPanahi Avatar asked Feb 08 '18 11:02

HoseinPanahi


People also ask

Can I use Vuetify 3?

The current version of Vuetify does not support Vue 3.

How do I update Vuetify to latest version?

Just try the command npm install vuetify --save . It will update with latest one.


3 Answers

Run npm info vuetify to lookup for the list of versions that they have.

Install the specific version that you want with the following. I am using the latest vuetify v1.0.0-beta.6 as an example.

Example:

npm install --save [email protected]

Alternatively, if you prefer yarn

yarn add [email protected]

You can replace --save with -S flag instead.

yarn requires no flags to save them into dependencies.

like image 185
Ru Chern Chong Avatar answered Oct 20 '22 04:10

Ru Chern Chong


to update vuetify version you must uninstall your old vuetify here is what i mean

uninstall it first

npm uninstall -S vuetify

then install it again

npm install -S vuetify

if you want to specify the version

npm install -S [email protected]

for example.

-S or --save is for dependencies

like image 35
Kent Dela Cruz Fueconcillo Avatar answered Oct 20 '22 04:10

Kent Dela Cruz Fueconcillo


Since npm version 5 (part of Node.js version 8), you can simply run

npm update vuetify

to update the package in node_modules and version in package.json/package.json.lock to the latest wanted version. Wanted version is the latest safe version that can be selected according to the constraints of semantic versioning and the ^ or ~ prefix in package.json.

To see what is the available wanted version, run

npm outdated

If you want to update both Vuetify and other packages to the latest major version (you rarely want this as Vuetify major versions are not necessarily backwards-compatible), run

npx npm-check-updates -u
npm install

See this excellent article by Carl Rippon for details.

like image 7
mrts Avatar answered Oct 20 '22 04:10

mrts