长生不老药凤凰活装不起作用



我的操作系统是最新的MacOS High Sierra。我通过Homebrew安装了Elixir和所有依赖关系。我创建了一个新的凤凰应用程序。它显示出一些错误。现场重新加载不起作用。以下是信息。

[error] Can't find executable `mac_listener`
[warn] Could not start Phoenix live-reload because we cannot listen to the file system.
You don't need to worry! This is an optional feature used during development to
refresh your browser when you save files and it does not affect production.

似乎某些文件更改侦听器服务未运行。但是我不知道该如何解决。

我通过重新安装命令行工具解决了此问题。打开bash,然后输入:

xcode-select --install

然后,运行mix deps.compile file_system以重新编译File_system模块。完成。

上面的解决方案都不适合我。就我而言,我要做的才能使Phoenix Live重新加载工作(设置还可以),是删除mix.lock文件,然后运行mix deps.get && mix deps.compile file_system

上面的答案对我有用(运行莫哈韦),但如所注释的,显然对每个人都无济于事。基于我在Elixir论坛上遇到的讨论,似乎是一个持续的问题,其他用户也存在问题:找不到可执行的mac_listener- [错误]退出:Genserver.call.call

一个用户指出,尝试所有以下所有内容后仍然遇到问题:

  • 卸载xcode
  • 删除命令行工具
  • 混合deps.clean -all&&rm -rf _build deps
  • 重新安装xcode
  • 运行Xcode-select-安装,接受许可协议
  • 重新启动
  • 运行混音deps.get&&混音deps.compile file_system
  • 找到/coreservices.h
  • 导出cflags =" - isysroot/library/developer/commandlinetools/sdks/macosx10.14.sdk/usr/include"

似乎帮助该特定用户运行以下操作的最后一步: open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

另一位Catalina用户建议通过运行export SDKROOT="$(xcrun --sdk macosx --show-sdk-path)"在.bash_profile中设置正确的标题路径,然后重新编译DEPS。

希望这些其他信息可以帮助某人。

我解决了解决方案,因为我已经安装了Xcode-select:

 sudo xcode-select --reset

,然后:

mix deps.compile file_system

您可以检查是否已安装:xcode-select -v路径: xcode-select -p

最新更新