我想检查一下我的模块是不是最新的
我有:sudo npm outdated
我得到了这个结果
Package Current Wanted Latest Location
oauth 0.9.9 0.9.9 0.9.10 twit > oauth
require-all 0.0.3 0.0.3 0.0.8 mysql > require-all
bignumber.js 1.0.1 1.0.1 1.3.0 mysql > bignumber.js
request 2.27.0 2.27.0 2.30.0 facebook-chat > node-xmpp > node-xmpp-client > request
through 2.2.7 2.2.7 2.3.4 facebook-chat > node-xmpp > brfs > through
然后我这样做:sudo npm update
,但如果我重复sudo npm outdated
,我会得到相同的结果...另外,如果我这样做,例如Info:
Package Current Wanted Latest Location
oauth 0.9.9 0.9.9 0.9.10 twit > oauth
然后更新
sudo npm update oauth
然后
sudo npm outdated oauth
我的结果是:
Package Current Wanted Latest Location
oauth 0.9.9 0.9.9 0.9.10 twit > oauth
发布于 2013-12-22 03:52:02
您的项目实际上是最新的,因为它可以是当前。
除非使用that version is also Wanted
,否则NPM不会简单地安装包的Latest
版本。
结果字段'wanted‘根据package.json中指定的版本显示最新版本,...
而且,对于您列出的每个版本,Wanted
和Current
版本已经匹配。
Package Current Wanted ...
oauth 0.9.9 0.9.9 ...
require-all 0.0.3 0.0.3 ...
bignumber.js 1.0.1 1.0.1 ...
request 2.27.0 2.27.0 ...
through 2.2.7 2.2.7 ...
例如,试图强制oauth
到其当前的Latest
of 0.9.10
实际上会被认为是invalid
as twit
has 0.9.9
listed exactly
"dependencies": {
"oauth": "0.9.9"
},
$ npm ls
...
└─┬ twit@1.1.11
└── oauth@0.9.10 invalid
npm ERR! invalid: oauth@0.9.10 ...\node_modules\twit\node_modules\oauth
发布于 2017-04-21 18:03:35
检查您的package.json可能是您的包或在那里。尝试使用--保存并尝试安装软件包将会起作用
示例: npm install underscore@1.5.0 --立即保存尝试npm过期
https://stackoverflow.com/questions/20725489
复制