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
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app?
Looking for hints regarding:
Addi...
New
Kia ora,
We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
Hi all, I wanted to ask how the community is dealing with post-release steps.
Today we have Ecto migrations, which make sure that the db...
New
Hello,
I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
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
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #ai
- #genstage
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










Showing Posts 1 to 10- Show Best Posts
- Show All Posts (oldest first)
- Show All Posts (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