I’m running into a number of issues when attempting to use the latest version of phoenix in an umbrella application. My process is as follows:
mix new auth_umbrella --umbrellacd auth_umbrella/appsmix phx.new.web auth --no-ecto(Y to install deps)cd auth- Add
{Phoenix.PubSub, name: Auth.PubSub}to supervision tree
Here is where my first issue arrises. When I start the server using mix phx.server everything compiles and starts with no errors but when I visit localhost:4000 I’m greeted with an unstyled page. Checking the sources in dev tools shows that app.css is present. When I generate a standalone phoenix app the landing page is styled as expected.
The next error occurs when attempting to add authentication:
6. cd ../ to return to apps directory
7. mix new auth_context --sup
8. cd auth (the phoenix app)
9. mix phx.gen.auth Accounts User users
Step 9 yields the error:
** (Mix) no context_app configured for current application auth.
Add the context_app generators config in config.exs, or pass the
--context-app option explicitly to the generators. For example:
via config:
config :auth, :generators,
context_app: :some_app
via cli option:
mix phx.gen.[task] --context-app some_app
Note: cli option only works when `context_app` is not set to `false`
in the config.
So in auth_umbrella/config/config.exs I set the context app to auth_context:
config :auth,
generators: [context_app: :auth_context]
and when I repeat step 9 I get the same error. I try to use the cli option with both mix phx.gen.auth Accounts User users --context-app :auth_context and mix phx.gen.auth Accounts User users --context-app auth_context . I get the following new error message:
** (Mix) Could not invoke task "phx.gen.auth": 1 error found!
--context-app : Unknown option






















