0

嗨,我正在 Docker 映像上使用 ember-cli 应用程序。当我使用运行 ember 应用程序时

 ember server

我收到以下消息

version: 0.2.6
0.2.7

"Could not find watchman, falling back to NodeWatcher for file system  events."

我在 Dockerfile 中尝试过

#install homebrew
RUN git clone https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew

ENV PATH="$HOME/.linuxbrew/bin:$HOME/local/m4/bin:$PATH"
ENV MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
ENV INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"

RUN brew install watchman

它似乎已正确安装..但我仍然收到消息说它找不到“守望者”

我错过了什么?

另外,我按照安装守望者尝试了以下操作

RUN apt-get install -y automake
RUN cd /tmp \
 git clone https://github.com/facebook/watchman.git \
 cd watchman \
 ./autogen.sh \
 ./configure \
 make \
 make install

然后我收到警告..并抛出以下错误

log.c: In function 'w_set_thread_name':
log.c:47:12: error: ignoring return value of 'vasprintf', declared with        attribute warn_unused_result [-Werror=unused-result]
vasprintf(&name, fmt, ap);
        ^
cc1: all warnings being treated as errors
make[1]: *** [watchman-log.o] Error 1
make: *** [all] Error 2

你们以前遇到过这种情况吗?我怎样才能解决这个问题..任何指针都会很棒。

4

1 回答 1

1

看起来当前的守望者版本失败了,我尝试了最新的稳定版本,它似乎可以与您上面的步骤一起使用。只需抓住 v3.1,它应该可以工作:

RUN git clone https://github.com/facebook/watchman.git \
    && cd watchman \
    && git checkout v3.1 \
    && ./autogen.sh \
    && ./configure \
    && make \
    && make install
于 2015-06-05T05:40:43.697 回答