繁体   English   中英

凤凰城:无法编译依赖关系:牧场

[英]Phoenix: Could not compile dependency :ranch

背景

我已经使用mix phx.new my_app --no-ecto创建了一个项目,一切看起来都很好。 但是,我无法运行创建的项目。

错误

当我执行mix phx.server (运行mix deps.get) ,出现以下错误:

===> Compiling ranch
===> Command ' OTP' not found in namespace bare
** (Mix) Could not compile dependency :ranch, "/home/user/.asdf/installs/elixir/1.7.3-otp-21/.mix/rebar3 bare compile --paths "/home/user/Workspace/exercises/islands_interface/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile ranch", update it with "mix deps.update ranch" or clean it with "mix deps.clean ranch"

操作系统和语言信息

Distributor ID: Ubuntu
Description:    Ubuntu 19.04
Release:    19.04
Codename:   disco

elixir         1.7.3-otp-21
erlang         21.1    

我究竟做错了什么?

我只是发现错误所在。

这是项目的绝对路径:

/home/user/Workspace/Functional Web Development with Elixir, OTP, and Phoenix/islands_interface

原来, phx.server错误phx.server因为它在文件夹/Functional Web Development with Elixir, OTP, and Phoenix/ 原来错误消息中“ OTP”中的空间来自文件夹的名称。

为了证明我的理论,我在/home/user/Workspace/下创建了一个名为test的项目。 一切正常。

进一步的调查揭示了问题的根源。 Phoenix依赖项rebar3在其名称中带有逗号的文件夹中存在一个错误。

https://elixirforum.com/t/phoenix-could-not-compile-dependency-ranch/22939/16?u=fl4m3ph03n1x

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM