I am running npm version 3.6.0 and node verison 5.6.0 on Windows 10:
> npm version
{ npm: '3.6.0',
ares: '1.10.1-DEV',
http_parser: '2.6.1',
icu: '56.1',
modules: '47',
node: '5.6.0',
openssl: '1.0.2f',
uv: '1.8.0',
v8: '4.6.85.31',
zlib: '1.2.8' }
>
I have a number of globally installed npm packages:
> npm ls -g --depth=0
C:\Users\Klas\AppData\Roaming\npm
+-- bower@1.7.7
+-- generator-gulp-angular@1.0.2
+-- generator-gulp-angular-subtask@0.9.1
+-- gulp@3.9.1
+-- jspm@0.16.25
+-- karma-cli@0.1.2
+-- live-server@0.9.0
+-- protractor@3.0.0
+-- tsd@0.6.5
+-- tslint@3.2.2
+-- typescript@1.7.5
+-- webpack@1.12.11
+-- webpack-dev-server@1.14.1
`-- yo@1.6.0
>
If I run npm outdated -g
several packages are listed as outdated.
> npm outdated -g
Package Current Wanted Latest Location
jspm 0.16.25 0.16.25 0.16.29
live-server 0.9.0 0.9.0 0.9.2
protractor 3.0.0 3.0.0 3.1.1
tslint 3.2.2 3.2.2 3.4.0
webpack 1.12.11 1.12.11 1.12.13
When I run npm update -g
it returns (after a couple of seconds) without any warning or error message. However, no packages have been updated.
> npm update -g
>
As I interpret this issue, npm update -g
should work, and should update top level global packages. But it doesn't seem to work for me.
If I run (thanks to Benjamin Kaiser for the tip):
> npm update -g --loglevel verbose
I get a lot of output. This seems to be the most relevant:
npm verb outdated not updating tslint because it's currently at the maximum version
that matches its specified semver range
I still don't quite understand. Since the packages are global, there is no specified semver range?
Running update on a particular package does not help either:
> npm update -g tslint
>
Not even specifying a version does any difference:
> npm update -g tslint@3.4.0
>
But even if that had worked I would rather not have to explicitly update each package. To me, a major feature of a package manager should be to make it easy to update everything at once.
This issue sounds related. But when I look at the tslint npm module the "latest" seems to be 3.4.0. So why no upgrade?