npm过时了,npm更新不起作用

时间:2021-01-12 21:45:34

I want to check if my modules are Latest

我想看看我的模块是否最新

i do: sudo npm outdated

我知道:sudo npm已经过时了

and I have this results

我得到了这个结果。

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

then i do this:sudo npm update but if I repeat sudo npm outdated i have the same results... also if I do for example Info:

然后我这样做:sudo npm更新,但是如果我重复sudo npm过时,我也会得到相同的结果……如果我这样做,比如信息:

Package              Current  Wanted  Latest  Location
oauth                  0.9.9   0.9.9  0.9.10  twit > oauth

Then Update

然后更新

sudo npm update oauth

Then

然后

sudo npm outdated oauth

My Result:

我的结果:

Package  Current  Wanted  Latest  Location
oauth      0.9.9   0.9.9  0.9.10  twit > oauth

2 个解决方案

#1


19  

Your project is actually as up-to-date as it can be currently.

您的项目实际上是最新的。

NPM won't simply install the Latest version of a package unless that version is also Wanted.

NPM不会简单地安装包的最新版本,除非也需要该版本。

The resulting field 'wanted' shows the latest version according to the version specified in the package.json, [...]

结果字段“wanted”根据包中指定的版本显示最新的版本。json,[…]

And, for each that you listed, the Wanted and Current versions already match.

并且,对于你列出的每一个,想要的和当前的版本已经匹配。

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 ...

An attempt to force oauth to its current Latest of 0.9.10, for example, would actually be considered invalid as twit has 0.9.9 listed exactly:

例如,试图强迫oauth达到其最新的0.9.10,实际上被认为是无效的,因为twit有0.9.9的精确列出:

"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

#2


-1  

Check your package.json may be your packages or there there. try to install package with --save and try it will work

检查你的包。json可能是你的包,也可能是那里。尝试安装包——保存并尝试它将工作。

example : npm install underscore@1.5.0 --save now try npm outdated

示例:npm安装underscore@1.5.0——保存现在尝试npm过时

#1


19  

Your project is actually as up-to-date as it can be currently.

您的项目实际上是最新的。

NPM won't simply install the Latest version of a package unless that version is also Wanted.

NPM不会简单地安装包的最新版本,除非也需要该版本。

The resulting field 'wanted' shows the latest version according to the version specified in the package.json, [...]

结果字段“wanted”根据包中指定的版本显示最新的版本。json,[…]

And, for each that you listed, the Wanted and Current versions already match.

并且,对于你列出的每一个,想要的和当前的版本已经匹配。

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 ...

An attempt to force oauth to its current Latest of 0.9.10, for example, would actually be considered invalid as twit has 0.9.9 listed exactly:

例如,试图强迫oauth达到其最新的0.9.10,实际上被认为是无效的,因为twit有0.9.9的精确列出:

"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

#2


-1  

Check your package.json may be your packages or there there. try to install package with --save and try it will work

检查你的包。json可能是你的包,也可能是那里。尝试安装包——保存并尝试它将工作。

example : npm install underscore@1.5.0 --save now try npm outdated

示例:npm安装underscore@1.5.0——保存现在尝试npm过时