Search code examples
npmnpm-publish

How to get latest version of my package from npmjs


For example below is package which is hosted in npmjs,

package - https://www.npmjs.com/package/@syncfusion/ej2-base

i want to get this package latest version through command with out installing it. is ther anyway available to achieve my requirement

purpose - To avoid when i set version for to publish this package again in npmjs. if i set lower version mistaken


Solution

  • You can do this

    npm show {package name} version
    

    It would just fetch the latest version and show, not installing the package.

    Also npm view , npm show , npm info and npm v all do the same thing.