- Node.js Web Development
- David Herron
- 135字
- 2021-06-25 21:54:06
Installing a package by version number
Version number matching in npm is powerful and flexible. The same sort of version specifiers used in package.json dependencies can also be used with the npm install command:
$ npm install package-name@tag
$ npm install package-name@version
$ npm install package-name@version-range
The last two are what they sound like. You can specify express@4.16.2 to target a precise version, or express@">4.1.0 < 5.0" to target a range of Express V4 versions.
The version match specifiers include these choices:
- Exact version match: 1.2.3
- At least version N: >1.2.3
- Up to version N: <1.2.3
- Between two releases: >=1.2.3 <1.3.0
The @tag attribute is a symbolic name such as @latest, @stable, or @canary. The package owner assigns these symbolic names to specific version numbers, and can reassign them as desired. The exception is @latest, which is updated whenever a new release of the package is published.
For more documentation, run these commands: npm help json and npm help npm-dist-tag.
- 手機(jī)安全和可信應(yīng)用開發(fā)指南:TrustZone與OP-TEE技術(shù)詳解
- HTML5+CSS3+JavaScript從入門到精通:上冊(cè)(微課精編版·第2版)
- Django+Vue.js商城項(xiàng)目實(shí)戰(zhàn)
- Learning C# by Developing Games with Unity 2020
- 編程珠璣(續(xù))
- 游戲程序設(shè)計(jì)教程
- Apex Design Patterns
- 用Python實(shí)現(xiàn)深度學(xué)習(xí)框架
- Learning ELK Stack
- PostgreSQL Replication(Second Edition)
- 琢石成器:Windows環(huán)境下32位匯編語(yǔ)言程序設(shè)計(jì)
- 圖數(shù)據(jù)庫(kù)實(shí)戰(zhàn)
- 區(qū)塊鏈技術(shù)進(jìn)階與實(shí)戰(zhàn)(第2版)
- SQL Server 2016 從入門到實(shí)戰(zhàn)(視頻教學(xué)版)
- iOS開發(fā)項(xiàng)目化入門教程