This repository was archived by the owner on Feb 10, 2026. It is now read-only.
Description When running mix lvn.setup.config I have this syntax error on import:
$ mix lvn.setup.config
Write to config/config.exs
(Y)es (n)o (d)iff
> y
Write to config/dev.exs
(Y)es (n)o (d)iff
> y
Write to lib/portal_web/endpoint.ex
(Y)es (n)o (d)iff
> y
** (SyntaxError) nofile:8:4: syntax error before: import
|
8 | ] import PortalWeb.UserAuth
| ^
(sourceror 1.7.1) lib/sourceror.ex:131: Sourceror.parse_string!/1
(live_view_native 0.3.1) lib/mix/live_view_native/codegen/patch.ex:404: Mix.LiveViewNative.CodeGen.Patch.merge_root_layouts/2
(live_view_native 0.3.1) lib/mix/live_view_native/codegen.ex:17: Mix.LiveViewNative.CodeGen.build_patches/3
(live_view_native 0.3.1) lib/mix/live_view_native/codegen.ex:7: Mix.LiveViewNative.CodeGen.patch/3
(live_view_native 0.3.1) lib/mix/live_view_native/codegen/patch.ex:334: anonymous fn/4 in Mix.LiveViewNative.CodeGen.Patch.patch_browser_pipeline/4
(elixir 1.15.2) lib/enum.ex:2510: Enum."-reduce/3-lists^foldl/2-0-"/3
(live_view_native 0.3.1) lib/mix/live_view_native/codegen/patch.ex:333: Mix.LiveViewNative.CodeGen.Patch.patch_browser_pipeline/4
I'm adding lvn to an existing phoenix application (1.7.18, originally 1.7.2).
I added the 0.3.0 dependencies from the getting started readme, then ran mix lvn.setup and mix lvn.setup.config.
That import only shows up in our router.ex. Brian asked for the first 10 LOC from that file:
defmodule PortalWeb.Router do
#alias PortalWeb.PageController
use PortalWeb, :router
import PortalWeb.UserAuth
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_live_flash
plug :put_root_layout, {PortalWeb.Layouts, :root}
plug :protect_from_forgery
plug :put_secure_browser_headers
plug :fetch_current_user
end
Reactions are currently unavailable