Mix phoenix.gen.secret doesn't work


I try to generate a secret with mix phoenix.gen.secret but I have this error when I run this command:

** (Mix) The task "phoenix.gen.secret" could not be found. Did you mean "phx.gen.presence"?

I saw an issue with the task “new”. But I don’t found the good URL for my case

Try phx instead of phoenix.


Thank you, it works, I did not notice that I had a different task name from the others! :slight_smile:

1 Like

It’s not different per se, phoenix is deprecated.


For me it still doesnt work

** (Mix) The task "phx.gen.secret" could not be found. Did you mean "phx.new.ecto"?

You need to run this command inside a project folder that has Phoenix installed. Otherwise the task won’t be found.

it is installed in the folder. thats the strange thing about it

Can you show your mix.exs dependencies? Have you run mix deps.get?