[英]mix deps.get fails (dependency issue)
i'm quite new to elixir and phoenix (and ubuntu) and have been battling to get myself up and running with web development. 我对elixir和phoenix(以及ubuntu)都很陌生,并且一直在努力让自己开始运行web开发。 upon creating a new phoenix application using
在使用时创建一个新的凤凰应用程序
mix phoenix.new webapp
i get the following errors from terminal 我从终端得到以下错误
Fetch and install dependencies? [Yn] y
* running mix deps.get
* error command failed to execute, please run the following command again after installation: "mix deps.get"
* running npm install && node node_modules/brunch/bin/brunch build
* error command failed to execute, please run the following command again after installation: "npm install && node node_modules/brunch/bin/brunch build"
and when running mix deps.get
当运行
mix deps.get
the resultant error message is 产生的错误消息是
** (Mix) No package with name phoenix_ecto (from: mix.exs) in registry
I'm still quite new when it comes to using this platform, so i'm not entirely sure how to pull/get/place/download the phoenix_ecto
package in the registry. 在使用这个平台时我仍然很新,所以我不完全确定如何在注册表中提取/获取/放置/下载
phoenix_ecto
包。 From what i understand this is all handled by hex package manager. 根据我的理解,这全部由hex包管理器处理。
I did manage to get phoenix up and running a few days ago, and managed to play around a little bit with developing small test applications. 我确实设法在几天前启动并运行phoenix,并设法开发小型测试应用程序。 but it seems somewhere in my reckless terminal sudoing i managed to break something somewhere.
但它似乎在我鲁莽的终端sudoing的某处,我设法在某处打破了某些东西。
some extra information 一些额外的信息
Elixir 1.3.4
Mix 1.3.4
npm 3.5.2
node v4.2.6
Phoenix v1.2.1
If any other information is required i will happily provide! 如果需要任何其他信息,我将很乐意提供!
I managed to fix the error by unlocking the dependencies and updating them. 我设法通过解锁依赖项并更新它们来修复错误。 the commands are below.
命令如下。
mix deps.unlock --all
mix deps.update --all
Now the projects are created and build no problem. 现在项目已创建并且构建没有问题。 Hope this helps someone.
希望这有助于某人。
Edit 1: 编辑1:
If the above does not work, there is the possibility that your hex install has been corrupted. 如果上述操作无效,则十六进制安装可能已损坏。 This was my case about a week after the original post.
这是我在原帖后一周的情况。 Can be fixed by removing hex and reinstalling.
可以通过删除十六进制并重新安装来修复。
rm -rf ~/.mix/archives/hex-0.15.0
mix local.hex
your hex version may be different from mine. 您的十六进制版本可能与我的不同。
hex-0.xx.x
This may appear in several cases. 这可能出现在几种情况下。 First check you
mix.exs
deps section. 首先检查一下
mix.exs
deps部分。 Ensure phoenix_ecto
placed with right version and opts. 确保
phoenix_ecto
放置正确版本并选择。 Further you need check phoenix_ecto
from local just clone repo and set {:phoenix_ecto, path: "..."}
in you project. 此外,您需要从本地只需克隆repo检查
phoenix_ecto
并在您的项目中设置{:phoenix_ecto, path: "..."}
。 Try to compile local. 尝试编译本地。 If it compiles local and not compiles in deps check phoenix_ecto mix.exs file and
defp package
method and ensure that return list with mix.exs [_, .., file: ~w{mix.exs}, _]
. 如果它编译本地而不是编译在deps中检查phoenix_ecto mix.exs文件和
defp package
方法并确保返回列表与mix.exs [_, .., file: ~w{mix.exs}, _]
。
In common this problem relate to mix.exs. 这个问题通常与mix.exs有关。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.