shahryarjb
Problem to asset deploy with esbuild
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
Most Liked
nikolauska
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_modules folder.
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.
Popular in Questions
Other popular 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
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex










