最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】如何用npm去install安装github上面某个库的指定版本

npm crifan 4814浏览 0评论

折腾:

【已解决】ReactNative iOS中使用react-native-vector-icons中的图标无法正常显示:Warning Failed prop type Invalid prop name of value user-p supplied to Icon

期间,

需要去安装最新版本的:

GitHub – oblador/react-native-vector-icons: Customizable Icons for React Native with support for NavBar/TabBar/ToolbarAndroid, image source and full styling.

想要在之前的:

npm install react-native-vector-icons –save

指定对应的版本。

npm github 如何安装

npm github 如何安装最新版

npm直接安装github仓库代码 | 前端开发者说

nodejs-wiki-book/node_npm.rst at master · nodejs-tw/nodejs-wiki-book · GitHub

npm github 指定版本

npm install 指定版本

npm常用命令 – haidao的专栏 – 博客频道

npm常用命令 – 腾讯Web前端 IMWeb 团队社区 | blog | 团队博客

用npm install react-native-vector-icons@master –save但是出错:

➜  node_modules npm install react-native-vector-icons@master –save
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "react-native-vector-icons@master" "–save"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! code ETARGET
npm ERR! notarget No compatible version found: react-native-vector-icons@’master’
npm ERR! notarget Valid install targets:
npm ERR! notarget ["4.0.0","3.0.0","2.1.0","2.0.3","2.0.2","2.0.1","2.0.0","1.3.4","1.3.3","1.3.2","1.2.1","1.2.0","1.1.1","1.1.0","1.0.4","1.0.3","1.0.2","1.0.1","1.0.0","1.0.0-rc","0.8.5","0.8.4","0.8.3","0.8.2","0.8.1","0.8.0","0.7.2","0.7.1","0.7.0","0.6.11","0.6.10","0.6.9","0.6.8","0.6.7","0.6.6","0.6.5","0.6.4","0.6.3","0.6.2","0.6.1","0.6.0","0.5.0","0.4.0","0.3.3","0.3.2","0.3.1","0.3.0","0.2.0","0.1.0"]
npm ERR! notarget
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn’t exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of ‘navbar-native’
npm ERR! notarget
npm ERR! Please include the following file with any support request:
npm ERR!     /Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/node_modules/navbar-native/node_modules/npm-debug.log
➜  node_modules

然后去官网注意到:

GitHub – oblador/react-native-vector-icons at v4.0.0

4.0.0中,已经好像包含最新的4.7的FontAwesome了?

➜  node_modules npm install [email protected] –save
[email protected] react-native-vector-icons

【总结】

最后用:

npm install [email protected] —save

即可实现,安装指定的4.0.0版本的react-native-vector-icons。

转载请注明:在路上 » 【已解决】如何用npm去install安装github上面某个库的指定版本

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
83 queries in 0.177 seconds, using 22.13MB memory