Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why `npm update -g` is not updating my global packages to the latest version?

Tags:

I'm following steps from updating global packages, so I executed npm outdated -g --depth=0 and got:

Package     Current  Wanted  Latest  Location typescript    2.2.2   2.2.2   2.4.1 

Then, I executed npm update -g, but I still got the same output from npm outdated -g --depth=0.

Executing npm list -g --depth=0 also confirms that the typescript package has not been updated to 2.4.1:

+-- [email protected] +-- [email protected] +-- [email protected] `-- [email protected] 

What am I missing?

like image 603
kiewic Avatar asked Jul 13 '17 07:07

kiewic


People also ask

Does npm update install new packages?

The npm install installs all modules that are listed on package. json file and their dependencies. npm update updates all packages in the node_modules directory and their dependencies.


Video Answer


1 Answers

You will have to either use this script or do them one by one it seems.

This global update is a known breaking point. Here is the reference to this issue. They seem to have closed it without addressing the issue

like image 125
Tikkes Avatar answered Oct 02 '22 14:10

Tikkes