Versión del paquete npm

Ejemplos de código

11
0

npm comprobar versión del paquete

local packages:
~$ npm list

globally installed packages:
~$ npm list -g

specific package:
~$ npm list <package>
4
0

versión npm

npm install -g npm@latest
3
0

instalar un paquete npm

npm install package-name

To save as a dependency:
npm install package-name --save
2
0

versión del paquete npm

// How to increment your project version
Ex: 1.0.0

* npm version patch ---> 1.0.1
* npm version minor ---> 1.1.0
* npm version major ---> 2.0.0

npm version [<newversion> | major | minor | patch | premajor | 
preminor | prepatch | prerelease [--preid=<prerelease-id>] | from-git]
1
0

qué significa la versión " * " en la dependencia de paquetes npm

Finally there is the *, which while available, isn’t used as often. The primary reason for its less frequent use is the fact that it acts as a stand in for either the major, minor, or patch number and catches any version number for the place that it represents. For example a dependency with a version of * would equate to any version that was greater than or equal to 0.0.0, while 1.* would allow versions greater than or equal to 1.0.0 and less than 2.0.0.
0
0

cómo instalar la última versión del paquete npm

//For global packages 
npm i -g <package name>@latest
npm i -g express@latest

//For loacal packages
npm outdated
npm update

//Manually updating local packages
npm i <package name>@latest
npm update "react" "react-dom"

En otros idiomas

Esta página está en otros idiomas

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................