Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install beta version via npm

I need to install a beta version 3.0.0 of react-docgen.

Is it possible to install a beta version via npm?

like image 346
Anaïs Saez Avatar asked Sep 28 '17 10:09

Anaïs Saez


People also ask

How do I install a specific version of npm?

For npm install specific version, use npm install [package-name]@[version-number]. Use npm view [package-name] version to know the specific latest version of a package available on the npm registry. Use npm list [package-name] to know the specific latest version of an installed package.

How do I install a specific version of node JS?

To install a specific version of Node, you need to run nvm list available first so you can see the versions of Node that are available. To install that specific version, run nvm install node-version-number . For example, nvm install 14.20.0 .

Is npm I npm install?

There is no difference, since "npm i" is an alias for "npm install". They both do the exact same thing (install or update all the dependencies in your package-lock.


2 Answers

The syntax for npm install includes both of the following overloads:

npm install [<@scope>/]<name>@<tag>
npm install [<@scope>/]<name>@<version>

For tag, you can specify either @latest and @beta like this:

npm install @11ty/eleventy@latest  # latest stable release
npm install @11ty/eleventy@beta    # latest beta release

Interestingly, if you don't specify a tag, the default, set by your npm config, is @latest

You can also find out which versions are available by running npm view

npm view @11ty/eleventy

npm view

like image 191
KyleMit Avatar answered Sep 18 '22 21:09

KyleMit


To install specific beta version:

yarn global add [email protected]  // if you use yarn instead of npm
npm install -g [email protected]

To install latest beta version:

yarn global add react-docgen@next  // if you use yarn instead of npm
npm install -g react-docgen@next
like image 26
Legends Avatar answered Sep 19 '22 21:09

Legends