Upgrading
Upgrading Nuxt is quick, but more involved than updating your package.json
If you are upgrading to Nuxt v2.14 and want to use static hosting then you will need to add target:static to your nuxt.config.js file in order for the generate command to work properly.
nuxt.config.js
export default {
target: 'static'
}
Getting Started
- Check the release notes for the version you wish to upgrade to see if there are any additional instructions for that particular release.
-
Update the version specified for the
nuxtpackage in yourpackage.jsonfile.
After this step instructions vary depending upon whether you are using Yarn or npm. Yarn is the preferred package manager for working with Nuxt as it is the development tool which tests have been written against.
Yarn
-
remove
yarn.lockfile -
remove
node_modulesdirectory -
Run the
yarncommand -
After installation has completed and you have run your tests consider upgrading other dependencies as well. The
yarn outdatedcommand can be used.
npm
-
remove
package-lock.jsonfile -
remove
node_modulesdirectory -
Run the
npm installcommand -
After installation has completed and you have run your tests consider upgrading other dependencies as well. The
npm outdatedcommand can be used.
Edit this page on GitHub
Updated at Mon, Feb 28, 2022
Leoš Literák
Trizotti
Clément Ollivier
Sébastien Chopin
Marcello Bachechi
Rodolphe
Thomas Underwood
Shek Evgeniy
felipesuri
Lukasz Formela
Hugo Torzuoli
Sylvain Marroufin
Kareem Dabbeet
tramplay
Daniel Roe
verebelyicsaba
Adam
Nate Butler
Sandra Rodgers
Arpit Patidar
Matthew Kuehn
Steven DUBOIS
Travis Lindsey
syagawa
Maxime
かる
Al Power
Florent Delerue
quanghm
José Manuel Casani Guerra
Unai Mengual
kazuya kawaguchi
Michael Lynch
Tomachi
pooya parsa
Meir Roth
Brett
Adam Miedema
Thomas Bnt
Kazuki Furukawa
Anthony Ruelle
Christophe Carvalho Vilas-Boas
Roman Harmyder