-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong path for distDir in templates #584
Comments
can you do |
OK, I will try to be as thorough as possible. Yes, it could be that nix is interfering with the environment.
Setup project
The
It turns out that I actually cannot do Let me know if there is anything else I can do. I will attempt to build this without nix as well. |
So from the layout you provided, it seems like your Anyways, since this is not an issue in the template, I will go ahead and close this for now but feel free to ping me if the issue persists. |
Meanwhile, I have installed rust via snap/rustup and can compile the project on Ubuntu 22.04. Details
sudo snap install rustup --classic
rustup default stable
cargo install create-tauri-app
# This creates the template:
cargo create-tauri-app
# These are additional things I found needed to be set up
rustup target add wasm32-unknown-unknown
export PATH=$PATH:$HOME/.cargo/bin
cargo install tauri-cli trunk
# enter the project directory (note that it does not contain `dist` and `index.html` is at the root of the project)
cd tauri-app
rustup target add wasm32-unknown-unknown
# This runs through without errors
trunk build
# This also runs
cargo tauri build -b deb I noticed that |
Thanks for clarifying the situation ❤️, hope this helps someone in the future. |
Hello, I am new to rust.
I believe there is something wrong with the templating. I could not get my project to build properly, because I ran into this issue: tauri-apps/tauri#3082
After changing the path of
distDir
from the default../dist
to../
, everything worked. The error messageAsset `index.html` not found; fallback to index.html.html
kind of hinted towards a path issue.To reproduce, you can use this
shell.nix
:Then, run
And select "Rust" language and "Leptos" UI template.
Then, run
cargo tauri build -b deb
, which will succeed, but installing the .deb and running it will fail:The app then opens, showing only
Could not get requested file.
and on the terminal prints (amongst other messages):Asset `index.html` not found; fallback to index.html.html
The fix is (as stated above), to set the correct
distDir
location to whereindex.html
is located.The text was updated successfully, but these errors were encountered: