Hello, I updated my project to phoenix 1.6 and I have some errors which do not let me start the project
At first:
after deleting node_modules folder I have this error when I run mix assets.deploy
/elixir # mix assets.deploy
> js/app.js:17:19: error: Could not resolve "topbar" (mark it as external to exclude it from the bundle)
17 │ import topbar from "topbar"
╵ ~~~~~~~~
> js/app.js:19:7: error: Could not resolve "regenerator-runtime/runtime.js" (mark it as external to exclude it from the bundle)
19 │ import "regenerator-runtime/runtime.js";
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I commented them but I do not know what they are
the second error I have
when I run mix assets.deploy my /assets/static which includes images, fonts, js, css and etc are not compiled and I just have a folder in /priv/static/assets which has these file app.js, app.css not the other file I need like phoenix.css and extra css and js file I have on /assets/static
when I run mix assets.deploy, they are converted to a single file like app.js or app.css if I want to load files directly on my html I should move the file to priv/static manually, after that I can load it on my html like this
it should be noted on phoenix 1.6 Map.get(conn.private, :phoenix_live_view) was changed, if you used it on liveview side you have to change your code but if you used it on api base phoenix project you do not need to change your code
FWIW, I followed the step by step guide you mentioned, hit the same error as @shahryarjb shared, googled and ended up on this thread.
I think the issue is not having set up an esbuild loader to handle the font file-types. Being new to Esbuild myself, I’m not sure what the solution is, but I’ll share it when I find it.