在atom+react-native项目中安装了nuclide。然而使用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
"htmlcode">
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

就可以了。。一番心酸。。老哥们赞一赞。。

以上这篇快速解决brew安装特定版本flow的问题就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。

标签:
tensorflow,安装版本

免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
狼山资源网 Copyright www.pvsay.com

评论“快速解决brew安装特定版本flow的问题”

暂无“快速解决brew安装特定版本flow的问题”评论...