1.7 migration: Compilation error in file lib/scorpion_web/router.ex

After migrating from 1.6 to 1.7, I am receiving this error when trying to start the server:

== Compilation error in file lib/scorpion_web/router.ex ==
** (UndefinedFunctionError) function Phoenix.Router.Route.exprs/1 is undefined or private. Did you mean:        * exprs/2
  (phoenix 1.7.0-rc.0) Phoenix.Router.Route.exprs(%Phoenix.Router.Route{verb: :post, line: 248, kind: :match, path: "/auth/:provider/callback", hosts: [], plug: PowAssent.Phoenix.AuthorizationController, plug_opts: :callback, helper: "pow_assent_post_authorization", private: %{}, pipe_through: [:skip_csrf_protection], assigns: %{}, metadata: %{log: :debug}, trailing_slash?: false, warn_on_verify?: true})
    (pow 1.0.27) lib/pow/phoenix/router.ex:216: Pow.Phoenix.Router.any_matching_routes?/3
    lib/scorpion_web/router.ex:248: (module)

I can’t figure out why this is happening after following the guide. Thanks!

It seems pow was using private Phoenix APIs. You should report a bug in the project if it has not been yet reported.

1 Like

It also seems pow is not supported by phoenix 1.7. It requires 1.6 or less