Phoenix: Fails to Install

Created on 8 Nov 2018  路  6Comments  路  Source: phoenixframework/phoenix

Environment

  • Elixir version (elixir -v): v1.7.2
  • Phoenix version (mix deps): v1.4.0
  • NodeJS version (node -v): v8.10.0
  • NPM version (npm -v): v3.5.2
  • Operating system: Ubuntu

Expected behavior

Expect Phoenix to install into correct directory

Actual behavior

On running mix archive.install hex phx_new 1.4.0, I get:

== Compilation error in file lib/phx_new/ecto.ex ==
** (File.Error) could not read file "/Users/chris/oss/phoenix/installer/templates/phx_ecto/repo.ex": no such file or directory
(elixir) lib/file.ex:272: File.read!/1
lib/phx_new/generator.ex:28: anonymous fn/4 in Phx.New.Generator."MACRO-__before_compile__"/2
(elixir) lib/enum.ex:1826: Enum."-reduce/3-lists^foldl/2-0-"/3
lib/phx_new/generator.ex:24: anonymous fn/3 in Phx.New.Generator."MACRO-__before_compile__"/2
(elixir) lib/enum.ex:1826: Enum."-reduce/3-lists^foldl/2-0-"/3
expanding macro: Phx.New.Generator.__before_compile__/1
lib/phx_new/ecto.ex:1: Phx.New.Ecto (module)

Most helpful comment

Fixed it. Conflict with previous install of Phoenix. I simply deleted the previous cache in asdf and then installed. All good.

All 6 comments

Fixed it. Conflict with previous install of Phoenix. I simply deleted the previous cache in asdf and then installed. All good.

@Lazarus404, what is asdf you've mentioned?

I did rm -rf ~/.mix/archives/phx_new/ and installation worked after it.

Thanks! Never heard about it before.

For me, the solution was mix archive.uninstall phx_new. I got a laugh at /Users/chris.... 馃樄

For me, the solution was mix archive.uninstall phx_new. I got a laugh at /Users/chris....

I have to admit, my sides split a little, too :)

Was this page helpful?
0 / 5 - 0 ratings