1252748 1252748 - 1 year ago 74
Javascript Question

Private NPM: How can the latest version of a module be installed?

Using private

, common commands seem not to work:

  • npm install
    without a specific
    :: issue

  • npm outdated
    :: issue

  • npm update
    :: issue

  • npm view <private-package-name> versions
    :: (haven't found issue yet)

    • also note that
      npm v
      npm show
      , and
      npm info
      are aliases that likewise don't work

Frequently, I will not know the latest version of a private module my team maintains. I would fall back on one of the commands listed above, but they seem inoperative. How can I install a package without knowing the latest version?

Answer Source

The solution I ultimately arrived at was to use the @* syntax when running the install:

npm install --save my-off_the_hook-module@*

This seems kind of sloppy to me but it does save the latest version of the module in a manner that is, so far as I can tell, equivalent to the more familiar (and my opinion more explicit) @latest syntax.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download