如何知道特定 npm 包的版本?

how to know what version exists for a specific npm package?

我是菜鸟。所以我不知道在哪里可以找到有效的版本号。

比如代码推送,我在他们的readme中只找到这个table:

React Native version(s) Supporting CodePush version(s)
<0.14   Unsupported
v0.14   v1.3 (introduced Android support)
v0.15-v0.18 v1.4-v1.6 (introduced iOS asset support)
v0.19-v0.28 v1.7-v1.17 (introduced Android asset support)
v0.29-v0.30 v1.13-v1.17 (RN refactored native hosting code)
v0.31-v0.33 v1.14.6-v1.17 (RN refactored native hosting code)
v0.34-v0.35 v1.15-v1.17 (RN refactored native hosting code)
v0.36-v0.39 v1.16-v1.17 (RN refactored resume handler)
v0.40-v0.42 v1.17 (RN refactored iOS header files)
v0.43-v0.44 v2.0+ (RN refactored uimanager dependencies)
v0.45+  TBD :) We work hard to respond to new RN releases, but they do occasionally break us. We will update this chart with each RN release, so that users can check to see what our "official" support is.

他们提到了 v1.17,所以我试试

"react-native-code-push": "^1.17",

但随后出现错误:

notarget No matching version found for react-native-code-push@^1.17

那么我从哪里知道以前的版本号对软件包有效?

package page at npmjs.com 的右栏中查看软件包的最新版本:

列出所有可用版本运行 npm view:

npm view react-native-code-push versions

returns

[ '1.0.0-beta',
  '1.0.1-beta',
   …
  '2.0.3-beta',
  '2.1.0-beta' ]