[英]Phoenix: Could not compile dependency :ranch
I have created a project using mix phx.new my_app --no-ecto
and everything looked fine. 我已经使用mix phx.new my_app --no-ecto
创建了一个项目,一切看起来都很好。 However I am not able to run the created project. 但是,我无法运行创建的项目。
When I execute mix phx.server
(after running mix deps.get)
I get the following error: 当我执行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
What am I doing wrong? 我究竟做错了什么?
I just found out what the error was. 我只是发现错误所在。
This is the absolute path of the project: 这是项目的绝对路径:
/home/user/Workspace/Functional Web Development with Elixir, OTP, and Phoenix/islands_interface
Turns out, phx.server
errors out because it is inside the folder /Functional Web Development with Elixir, OTP, and Phoenix/
. 原来, phx.server
错误phx.server
, 因为它在文件夹/Functional Web Development with Elixir, OTP, and Phoenix/
。 Turns out that space in ' OTP' in the error message is from the folder's name. 原来错误消息中“ OTP”中的空间来自文件夹的名称。
To prove my theory I created a project called test
under /home/user/Workspace/
. 为了证明我的理论,我在/home/user/Workspace/
下创建了一个名为test
的项目。 Everything worked perfectly. 一切正常。
Further investigation revealed the source of the problem. 进一步的调查揭示了问题的根源。 A Phoenix dependency, rebar3, has a bug with folders that have commas in their names. Phoenix依赖项rebar3在其名称中带有逗号的文件夹中存在一个错误。
https://elixirforum.com/t/phoenix-could-not-compile-dependency-ranch/22939/16?u=fl4m3ph03n1x https://elixirforum.com/t/phoenix-could-not-compile-dependency-ranch/22939/16?u=fl4m3ph03n1x
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.