shahryarjb
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
my asset link: mishka-cms/apps/mishka_html/assets at master · shahryarjb/mishka-cms · GitHub
my config: mishka-cms/config/config.exs at master · shahryarjb/mishka-cms · GitHub
my dev: mishka-cms/config/dev.exs at master · shahryarjb/mishka-cms · GitHub
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #ai
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 6- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
shahryarjb
as I discovered, all the files which are imported on
app.cssandapp.jslike thiswhen I run
mix assets.deploy, they are converted to a single file likeapp.jsorapp.cssif I want to load files directly on my html I should move the file topriv/staticmanually, after that I can load it on my html like thisbut I still have problem with custom fonts
shahryarjb
I am forced to separate font css file and move it to
priv/staticmanually and load it onroot.html.heexdirectly.LostKobrakai
There’s a step by step guide for upgrading here:
Also I’d suggest comparing with a fresh 1.6 installation, because there’s a few more things different than just not having a
node_modulesfolder.shahryarjb
I have read this article and I did it with this article help but This is incomplete on old project
and even it has typo problem.
yes I compared with a fresh 1.6 installation, and now I have no error and my project is running
AlchemistCamp
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.
nikolauska
It should work if you just add
--loader:.woff=fileto esbuild config