Upgrading Next.js, what do the carats do? #12808
-
On the Next.js 9.4 blog post it didn't give upgrade instructions but the Next 9.3.5 blog post did. I normally would have just Doesn't running old:
new with carets:
just curious, thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The carets in After the initial installation, |
Beta Was this translation helpful? Give feedback.
The carets in
package.json
will update you to all future minor/patch versions (this Stack Overflow question answers it actually). So if you had"next": "^9.4.0"
in a new project, rannpm install
and the latest version of Next available was9.4.1
, then it would install that9.4.1
version for you.After the initial installation,
package-lock.json
files will lock to whatever version you installed originally when the dependency was first installed (unless you manually increment the version yourself).