No web resources loaded with Liveview

I was trying to update Phoenix Liveview from 0.6 to 0.10.0 and after the update it seems that web resources (js, css) are not being loaded into the page.

Only the html document is being loaded

I’m not very well versed in webpack but it seems that the references in package.json are fine:

  "dependencies": {
    "daterangepicker": "^3.0.5",
    "jquery": "~3.4.1",
    "phoenix": "file:../deps/phoenix",
    "phoenix_html": "file:../deps/phoenix_html",
    "phoenix_live_view": "file:../deps/phoenix_live_view"

My only clue right now is VSCode hinting me an import in app.js:

On mouse hover it warns about:

Could not find a declaration file for module 'phoenix_live_view'.
'/workspace/nike/deps/phoenix_live_view/priv/static/phoenix_live_view.js' implicitly has an 'any' type.

The file phoenix_live_view.js is in the directory so it seems that the build references are alright. I tried to remove the node_modules directory and npm install to no avail.

Traditional views are loading web assets with no issues, would this have something to do with the socket endpoint?


LiveView no longer uses the default app layout. Instead, use put_root_layout . Note, however, that the layout given to put_root_layout must use @inner_content instead of <%= render(@view_module, @view_template, assigns) %> and that the root layout will also be used by regular views. Check the Live Layouts section of the docs.

From the Layouts section of the Installation Guide in master.


Took me a while to get back to this but thank you so much for pointing me at the repo and documentation.

The team is already on it :grin: