How do I update to the latest version of `serve`
Asked Answered
I

4

13

I am using Gatsby v1.1.52 running Node v8.11.3.

When I run gatsby serve I am prompted with with message mentioning that there is an UPDATE AVAILABLE: The latest version ofserveis 9.1.0. I've tried running npm update -g gatsby' and 'npm update -g gatsby-cli.

Update available message

I can't find any documentation: the manual entry does not exist, the options (gatsby ?) doesn't include an update command and gatsby serve ? only serves the website again.

Gatsby options

I found a global npm package called serve but it is on version 5.6.0 and I don't think it is the same package that is being referred to in this instance but I am grasping at straws here.

Any ideas what command I need to run in order to update serve?

Interrogate answered 25/6, 2018 at 0:19 Comment(0)
A
4

gatsby comes with serve@^6.5.3 installed, so there's not much you can do except wait (or open a PR!) until it's updated in the gatsby package. Fortunately there's not really a need to update it since it still works fine, it's just a notice from serve.

Armijo answered 29/6, 2018 at 13:47 Comment(0)
C
20

For those not using Gatsby, here is how to update serve:

Globally: sudo npm update -g serve

Locally: npm update serve

Creole answered 3/12, 2018 at 23:37 Comment(1)
You don't need sudo to install globally. You could very well do npm update -g serveHairpiece
O
6

Run the following via terminal: sudo npm i serve@latest -g -d

Odette answered 29/7, 2019 at 18:53 Comment(0)
A
4

gatsby comes with serve@^6.5.3 installed, so there's not much you can do except wait (or open a PR!) until it's updated in the gatsby package. Fortunately there's not really a need to update it since it still works fine, it's just a notice from serve.

Armijo answered 29/6, 2018 at 13:47 Comment(0)
M
0

Quick answer:

yarn upgrade -g serve
Milly answered 21/12, 2022 at 13:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.