hhvm - Nuclide IDE 和使用 Watchman 进行远程服务器设置

标签 hhvm hacklang watchman nuclide-editor

Facebook 最近宣布 Nuclide ,支持远程开发和黑客攻击。

我已遵循所有安装说明,但是 autocomplete/inline error report/click-to-definition功能不起作用,而 nuclide-language-hack, nuclide-file-tree/nuclide-remote-projects按预期工作(并且来自服务器部分的 nuclide-server/.hhconfig 文件包含在项目根目录中)。

除了 flow 之外,我已经安装了所有这些通过过滤nuclide-的结果.

远程访问是否不支持这些功能,或者我在安装时犯了一些错误(我认为这非常简单)?

而且,我不明白怎么办watchman已配置可正常工作。我已经使用以下命令安装了它(服务器运行Linux,我还安装了inotify-tools)

$ git clone https://github.com/facebook/watchman.git
$ cd watchman
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install

我使用以下内容来观看我的项目

$ watchman watch /my/project/root

观察者似乎建立得很好。

但是 Nuclide 报告:

Watcher failed to start - watcher features disabled!

Details: socket hang up

很抱歉我在这里询问安装建议,但我认为上述内容也不应该在 Github 上询问。

谢谢!


解决方案:正如 MostafaEweda 所建议的,我尝试从源代码进行编译。 apm或通过原子设置进行包安装,对我来说不起作用。 nuclide-installer根本没有安装任何东西,手动安装nuclide-*软件包也不起作用。

对于Windows Users :Python3.4 会引发一些运行时错误(尽管文档说支持 Python 2.6 或更高版本)。我使用Python2.7,这些错误似乎消失了。

提示:安装 nuclide 时,您必须等待几分钟,atom 将变得无响应。要有耐心!

最佳答案

似乎核素的WatchmanClient由于某种原因无法连接到您安装的 watchman。

请注意 WatchmanClient 的测试当前已禁用,但当您删除 x 时,它可能会显示一些有用的错误来自 WatchmanClient-spec.js 第 20 行并运行:npm testwatchman-helpers目录或在 _command 中添加一些日志记录或堆栈跟踪功能。

但是,所有这些都与不适合您的 Hack 功能无关。

我建议尝试通过以下方式从源代码构建 Nuclide:

git clone <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="95f2fce1d5f2fce1fde0f7bbf6faf8" rel="noreferrer noopener nofollow">[email protected]</a>:facebook/nuclide.git ~/nuclide && cd ~/nuclide && ./scripts/dev/setup

然后,使用/home/$USER/pkg/nuclide/server/nuclide-start-server作为远程服务器命令。

最后,日志文件的内容:~/nuclide.nohup.out/tmp/nuclide-logs/nuclide.log在您的客户端和服务器上可以帮助您了解正在发生的事情。

关于hhvm - Nuclide IDE 和使用 Watchman 进行远程服务器设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31125337/

相关文章:

React-native Fast Refresh 坏了

mysql - Docker 内部的 HHVM 和主机上的 MySQL(外部)

polymorphism - Hack语言会支持函数重载多态吗?

Hacklang:如何从异常中获取堆栈跟踪?

php - Hack typechecker 无法识别函数内的 'global' 关键字

ios - React-native 不会在模拟器中重新加载 ios 应用程序

node.js - 在 xcode 上构建 react native 项目需要永远(非常慢)在运行 1 of 1 自定义 shell 脚本的过程中

php - HHVM:pthreads PHP 类

generics - 黑客语言 : generics for collection types

php - 如何在 hacklang/hhvm 中使用 Mysql PDO 驱动程序