包名安装
npm i react : 默认安装 react模块 latest 标签上的最新版本
包名加版本
npm i react@16.8.1 : 安装 react模块16.8.1的版本
包名加 tag
npm i react@next : 安装 react模块 next 标签上的最新版本
tarball url
npm i https://registry.npmjs.org/react/-/react-16.8.1.tgz : 安装 react模块16.8.1的版本
tarball file
npm i file: xxxx.xxx.tgz tarball file 可以通过 npm pack 命令得到
git url
username/project
npm i github:facebook/react