Exécuter :
npm config set proxy http://xxx.yyy.zzz.aaa:80
Installer dependencies et devDependencies : npm install
Installer dependencies : npm install --production
Installer devDependencies : npm install --dev
Version | Description |
---|---|
version | Must match version exactly |
>version | Must be greater than version |
>=version | etc |
<version | |
<=version | |
~version | ~1.2.3 autorise 1.2.3 jusqu'à <1.3.0 |
^version | ^2.3.4 autorise 2.3.4 jusqu'à <3.0.0 |
1.2.x | 1.2.0, 1.2.1, etc., but not 1.3.0 |
http://... | See ‘URLs as Dependencies’ below |
* | Matches any version |
"" | (just an empty string) Same as * |
version1 - version2 | Same as >=version1 <=version2 . |
range1 || range2 | Passes if either range1 or range2 are satisfied. |
git... | See ‘Git URLs as Dependencies’ below |
user/repo | See ‘GitHub URLs’ below |
tag | A specific version tagged and published as tag See npm-dist-tag |
path/path/path | See Local Paths below |
Specifics of npm's package.json handling Archive le 18/05/2020
What's the difference between a tilde (~) and a caret (^) in a npm package.json file? Archive du 13/07/2017 le 17/08/2021
npm view paquet versions --json
Il parait que la commande ci-dessous fonctionne. Mais pas chez moi.
npm outdated npm update -dd npm install
Installer le paquet npm-check-updates
et exécuter la mise à jour.
Attention, cela force la dernière mise à jour sans vérifier la compatibilité entre les paquets.
npm i --location=global npm-check-updates npm-check-updates -u npm install
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
Lancer un npm install -g npm