Wojciech
I have integrated LiveSvelt into my project, and after doing so i decided to setup create a release of my application using docker but i got an error saying that ** (Mix) The task "node" could not be found, that’s probably because LiveSvelte setup tutorial told me to change mix assets.deploy alias from:
"assets.deploy": ["tailwind default --minify", "esbuild default --minify", "phx.digest"]
to:
"assets.deploy": [
"tailwind default --minify",
"node build.js --deploy --prefix assets",
"phx.digest"
]
Which resulted in an error saying that node(and also build.js after a fix) cannot be found so i changed it to cmd node assets/build.js --deploy --prefix assets
Now i get this error which says that files: “js/server.js”, “js/app.js” and “tsconfig.json” don’t exist even though i see that they exist, here’s exact error message.
✘ [ERROR] Cannot find tsconfig file "tsconfig.json"
✘ [ERROR] Cannot find tsconfig file "tsconfig.json"
✘ [ERROR] Could not resolve "js/server.js"
✘ [ERROR] Could not resolve "js/app.js"
2 errors
2 errors
/home/wojtek/justrunit/assets/node_modules/esbuild/lib/main.js:1604
let error = new Error(`${text}${summary}`);
^
Error: Build failed with 2 errors:
error: Cannot find tsconfig file "tsconfig.json"
error: Could not resolve "js/server.js"
at failureErrorWithLog (/home/wojtek/justrunit/assets/node_modules/esbuild/lib/main.js:1604:15)
at /home/wojtek/justrunit/assets/node_modules/esbuild/lib/main.js:1056:28
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
errors: [
{
detail: undefined,
id: '',
location: null,
notes: [],
pluginName: '',
text: 'Cannot find tsconfig file "tsconfig.json"'
},
{
detail: undefined,
id: '',
location: null,
notes: [],
pluginName: '',
text: 'Could not resolve "js/server.js"'
}
],
warnings: []
}
I woud really appreciate some guidance as i am stuck with this error for a few days now, thank you.
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #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
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
codeanpeace
Did you add node to your docker environment?
source: GitHub - woutdp/live_svelte: Svelte inside Phoenix LiveView with seamless end-to-end reactivity · GitHub
Wojciech
in my dockerfile i have this line:
so it should’ve been installed.
I think i should mention that the issue is present when i run
mix assets.deployand also when i try doingdocker compose uprhcarvalho
Did you check that those files exist inside of the container? You can check it by starting a new container off your image with a bash session to try to
lsand debug from there.Wojciech
Thank you for your reply
I extracted filesystem out of the image and both node and npm were in there, and when i tried executing
RUN node --versionandRUN npm --versionthey both returned their versions as expected, i have npm 10 and node 22 installed if that matters.Here is my whole dockerfile, i haven’t modified anything except installing curl so i can get access to more recent version of node and then installing it.
Besides that nothing have changed and trying to build an image still results in:
rhcarvalho
For the error above the problem is there’s no task “node”. Update your
mix.exssuch that it becomescmd node .... Thecmdtask can run shell commands.rhcarvalho
After that we might need to look at the file
build.js, it might be making wrong assumptions about the current working directory and therefore cannot find the other files it seems to reference.Wojciech
Okay, so LiveSvelte documentation is wrong? It would be kind of weird that a package with over 1k stars on github has a wrong setup guide and no one noticed.
Thanks for help, i will try to change few things here and there in
build.jsand will post results.codeanpeace
Hmm, the LiveSvelte docs mentions adding
RUN npm installto the Dockerfile.source: Deployment: Deploying on Fly.io | LiveSvelte Readme
Wojciech
That’s correct, i was surprised because because i had to add
cmdbeforenode build.js --deploy --prefix assets. I did everything which was said in docs regarding Dockerfile.rhcarvalho
You may send a PR to fix the docs. Compare the Windows and Linux/macOS instructions in the README, they are surprisingly different.
Also notice the example project uses the
cmdtask:https://github.com/woutdp/live_svelte/blob/master/example_project%2Fmix.exs#L72