Elixir: mix phoenix.new fails on Windows 10

Created on 2 Aug 2017  Â·  7Comments  Â·  Source: elixir-lang/elixir

When I attempt to use mix phoenix.new on Windows 10, I get this message:

U:\skunkworks>mix phoenix.new ldap_example
** (Mix) Application name must start with a letter and have only lowercase letters, numbers and underscore, got: "ldap_example". The application name is inferred from the path, if you'd like to explicitly name the application then use the `--app APP` option.

However, this works just fine.
U:\skunkworks>mix new ldap_example

Environment:

Erlang/OTP 20 [erts-9.0] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10]

Elixir 1.5.1

Phoenix v1.2.0

Mix 1.5.1

All 7 comments

Edit:

Even though it looks like Phoenix is reporting v 1.2.0, I made sure to install 1.3.0 via this command:

mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new-1.3.0.ez

Version still reports Phoenix v1.2.0

What version of phoenix.new are you running? I have both phoenix.new and phx.new installed (yes I should remove the old one), and the new mix phx.new command works fine on Elixir 1.5.0, but I get the same error with mix phoenix.new as seen:

$ mix phoenix.new ldap_example
** (Mix) Application name must start with a letter and have only lowercase letters, numbers and underscore, got: "ldap_example". The application name is inferred from the path, if you'd like to explicitly name the application then use the `--app APP` option.

You may just want to use the new phoenix 1.3 installer for now, which you can install by running mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez then just use it like mix phx.new ldap_example.

Do note, Phoenix 1.2 uses phoenix.blah commands where Phoenix 1.3 uses phx.blah commands. You can uninstall the phoenix 1.2 setup by running mix archive.uninstall phoenix_new I think.

I'll give it a try Overmind!

On Wed, Aug 2, 2017 at 4:37 PM, OvermindDL1 notifications@github.com
wrote:

What version of phoenix.new are you running? I have both phoenix.new and
phx.new installed (yes I should remove the old one), and the new mix
phx.new command works fine on Elixir 1.5.0, but I get the same error with mix
phoenix.new as seen:

$ mix phoenix.new ldap_example** (Mix) Application name must start with a letter and have only lowercase letters, numbers and underscore, got: "ldap_example". The application name is inferred from the path, if you'd like to explicitly name the application then use the --app APP option.

You may just want to use the new phoenix 1.3 installer for now, which you
can install by running mix archive.install https://github.com/
phoenixframework/archives/raw/master/phx_new.ez then just use it like mix
phx.new ldap_example.

Do note, Phoenix 1.2 uses phoenix.blah commands where Phoenix 1.3 uses
phx.blah commands. You can uninstall the phoenix 1.2 setup by running mix
archive.uninstall phoenix_new I think.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/elixir-lang/elixir/issues/6427#issuecomment-319790936,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJXFc3yX3dU1tSC_7rMbuojsxfGOFTbks5sUN4WgaJpZM4OrndF
.

--
Onorio Catenacci

http://onor.io
http://www.google.com/+OnorioCatenacci

Yep phx.new (as opposed to phoenix.new) does the trick. Sorry for the false
alarm folks! I didn't know the command had gotten changed.

On Wed, Aug 2, 2017 at 4:37 PM, OvermindDL1 notifications@github.com
wrote:

What version of phoenix.new are you running? I have both phoenix.new and
phx.new installed (yes I should remove the old one), and the new mix
phx.new command works fine on Elixir 1.5.0, but I get the same error with mix
phoenix.new as seen:

$ mix phoenix.new ldap_example** (Mix) Application name must start with a letter and have only lowercase letters, numbers and underscore, got: "ldap_example". The application name is inferred from the path, if you'd like to explicitly name the application then use the --app APP option.

You may just want to use the new phoenix 1.3 installer for now, which you
can install by running mix archive.install https://github.com/
phoenixframework/archives/raw/master/phx_new.ez then just use it like mix
phx.new ldap_example.

Do note, Phoenix 1.2 uses phoenix.blah commands where Phoenix 1.3 uses
phx.blah commands. You can uninstall the phoenix 1.2 setup by running mix
archive.uninstall phoenix_new I think.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/elixir-lang/elixir/issues/6427#issuecomment-319790936,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJXFc3yX3dU1tSC_7rMbuojsxfGOFTbks5sUN4WgaJpZM4OrndF
.

--
Onorio Catenacci

http://onor.io
http://www.google.com/+OnorioCatenacci

It is still very weird that that error happens with the older phoenix though, it makes no sense... o.O

You are likely using Erlang/OTP 20 which changed how regular expressions are matched, causing the name check to always fail. If you upgrade the archive to latest v1.3 or latest v1.2, the bug is fixed, and that's why it works.

Yep--using Erlang 20. It's in the original bug report ^

On Aug 2, 2017 5:41 PM, "José Valim" notifications@github.com wrote:

You are likely using Erlang/OTP 20 which changed how regular expressions
are matched, causing the name check to always fail. If you upgrade to
latest v1.3 or latest v1.2, the bug is fixed, and that's why it works.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/elixir-lang/elixir/issues/6427#issuecomment-319807004,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJXFWEfLzIkZhlNn586ODSFHMpFVvL-ks5sUOzsgaJpZM4OrndF
.

Was this page helpful?
0 / 5 - 0 ratings