npm outdated and npm update doesn't work

后端 未结 2 1381
没有蜡笔的小新
没有蜡笔的小新 2021-02-07 17:51

I want to check if my modules are Latest

i do: sudo npm outdated

and I have this results

Package              Current  Wanted  Lates         


        
相关标签:
2条回答
  • 2021-02-07 18:39

    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.

    The resulting field 'wanted' shows the latest version according to the version specified in the package.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:

    "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
    
    0 讨论(0)
  • 2021-02-07 18:39

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

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

    0 讨论(0)
提交回复
热议问题