Rumah >hujung hadapan web >tutorial js >如何使用brew安装特定版本flow
这次给大家带来如何使用brew安装特定版本flow,使用brew安装特定版本flow的注意事项有哪些,下面就是实战案例,一起来看一下。
$ brew -v Homebrew 1.2.0 $ flow version Flow, a static type checker for JavaScript, version 0.45.0 $ flow Launching Flow server for /Users/real/Desktop/reactPro/pro2 Wrong version of Flow. The config specifies version ^0.42.0 but this is version 0.45.0
在我的.flowconfig文件中最后的地方也可以看到:
[version] ^0.42.0
这意味着flow的版本应该是>=0.42.0 <0.43.0,所以0.45.0是不合适的。这就需要下载0.42.0的版本。
搜索了网上一些说法(brew 安装特定版本):
brew install flow(安装的是最新版本)
brew versions (已经废弃了)
brew tap homebrew/versions(已经废弃了)
Warning: homebrew/versions was deprecated. This tap is now empty as all its formulae were migrated.
npm install flow-bin@0.42.0 -g (可以安装,但是没看到实际效果)
在我安装flow的过程中有这样的提示:
$ brew install flow ==> Downloading https://homebrew.bintray.com/bottles/flow-0.45.0.sierra.bottle.tar.gz Already downloaded: /Users/real/Library/Caches/Homebrew/flow-0.45.0.sierra.bottle.tar.gz ==> Pouring flow-0.45.0.sierra.bottle.tar.gz ==> Caveats Bash completion has been installed to: /usr/local/etc/bash_completion.d zsh completions have been installed to: /usr/local/share/zsh/site-functions ==> Summary �� /usr/local/Cellar/flow/0.45.0: 8 files, 6.4MB</p> <p style="text-align: left;">它下载的是0.45.0的版本,而我需要的是0.42.0的版本,于是我手动下载了。</p> <pre class="brush:php;toolbar:false">https://homebrew.bintray.com/bottles/flow-0.42.0.sierra.bottle.tar.gz
然后将解压后的文件放到
/usr/local/Cellar/flow/
这样就安装了0.42.0的版本。然后通过
$ brew switch flow 0.42.0
就可以了。。一番心酸。。老哥们赞一赞。。
相信看了本文案例你已经掌握了方法,更多精彩请关注php中文网其它相关文章!
推荐阅读:
Atas ialah kandungan terperinci 如何使用brew安装特定版本flow. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!