背景
我使用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 我做错了什么?
发布于 2019-06-06 10:31:08
我刚发现错误是什么。
这是项目的绝对路径:
/home/user/Workspace/Functional Web Development with Elixir, OTP, and Phoenix/islands_interface
结果,phx.server出错是因为它在文件夹/Functional Web Development with Elixir, OTP, and Phoenix/中。结果显示,错误消息中“OTP”中的空格来自文件夹的名称。
为了证明我的理论,我创建了一个名为test的/home/user/Workspace/项目。一切都很完美。
进一步的调查揭示了问题的根源。菲尼克斯依赖项rebar3有一个错误,它的文件夹中有逗号。
https://elixirforum.com/t/phoenix-could-not-compile-dependency-ranch/22939/16?u=fl4m3ph03n1x
https://stackoverflow.com/questions/56455990
复制相似问题