dx server with new created app: Cargo build failed - no output location failed
Closed this issue · 4 comments
Problem
I was try to create "Steps To Reproduce" for #3383. I created a new app with dx new
but the created app did not build.
I hit similar issue multiple times at the last past days and but i did not find the cause of the issue.
Somehow it
Steps To Reproduce
Steps to reproduce the behavior:
❯ dx --version
dioxus 0.6.0 (was built without git repository)
❯ dx new engine-test
✔ 🤷 Which sub-template should be expanded? · Bare-Bones
✔ 🤷 Do you want to use Dioxus Fullstack? · true
✔ 🤷 Do you want to use Dioxus Router? · false
✔ 🤷 Do you want to use Tailwind CSS? · false
✔ 🤷 Which platform do you want DX to serve by default? · Web
9.993s INFO Generated project at /home/lukas/git/engine-test
9.996s INFO `cd` to your project and run `dx serve` to start developing. Build cool
❯ cd engine-test/
❯ dx serve --platform web
13:57:02 [dev] -----------------------------------------------------------------
Serving your Dioxus app: engine-test 🚀
• Press `ctrl+c` to exit the server
• Press `r` to rebuild the app
• Press `o` to open the app
• Press `v` to toggle verbose logging
• Press `/` for more commands and shortcuts
Learn more at https://dioxuslabs.com/learn/0.6/getting_started
----------------------------------------------------------------
13:57:02 [dev] Cargo build failed - no output location
13:57:02 [dev] Build failed: Other(Build did not return an executable)
╭────────────────────────────────────────────────────────────────────────────────────────── /:more ╮
│ App: ━━━━━━━━━━━━━━━━━━━━━━━━━━ ❌ Platform: Web + fullstack │
│ Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━ ❌ App features: ["web"] │
│ Status: Failed Serving at: http://127.0.0.1:8080 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
✘ dx serve --platform web --verbose
14:01:34 [dev] Loading crate
14:01:34 [dev] Found package NodeIndex(46)
14:01:34 [dev] Could not find explicit feature for platform server, passing `fallback` instead
14:01:34 [dev] Verifying tooling...
14:01:34 [dev] Watching path "/home/lukas/git/engine-test/Cargo.toml"
14:01:34 [dev] Watching path "/home/lukas/git/engine-test/Dioxus.toml"
14:01:34 [dev] Watching path "/home/lukas/git/engine-test/README.md"
14:01:34 [dev] Watching path "/home/lukas/git/engine-test/assets"
14:01:34 [dev] Watching path "/home/lukas/git/engine-test/src"
14:01:34 [dev] Watching path "/home/lukas/git/engine-test"
14:01:34 [dev] -----------------------------------------------------------------
Serving your Dioxus app: engine-test 🚀
• Press `ctrl+c` to exit the server
• Press `r` to rebuild the app
• Press `o` to open the app
• Press `v` to toggle verbose logging
• Press `/` for more commands and shortcuts
Learn more at https://dioxuslabs.com/learn/0.6/getting_started
----------------------------------------------------------------
14:01:34 [dev] wasm-bindgen version 0.2.99 is compatible with dioxus-cli ✅
14:01:34 [dev] Running build command...
14:01:34 [dev] Building app...
14:01:34 [dev] Initialized Root dir: "/home/lukas/git/engine-test/target/dx/engine-test/debug/web/public"
14:01:34 [dev] Initialized Exe dir: "/home/lukas/git/engine-test/target/dx/engine-test/debug/web/public/wasm"
14:01:34 [dev] Initialized Asset dir: "/home/lukas/git/engine-test/target/dx/engine-test/debug/web/public/assets"
14:01:34 [dev] Executing cargo...
14:01:34 [dev] cargo args: ["--profile", "wasm-dev", "--target", "wasm32-unknown-unknown", "--verbose", "--features", "web", "--bin", "engine-test"]
14:01:34 [dev] Building server...
14:01:34 [dev] Building app...
14:01:34 [dev] Executing cargo...
14:01:34 [dev] cargo args: ["--profile", "server-dev", "--verbose", "--features", "dioxus/server", "--bin", "engine-test"]
14:01:35 [dev] cargo args: ["--profile", "wasm-dev", "--target", "wasm32-unknown-unknown", "--verbose", "--features", "web", "--bin", "engine-test"]
14:01:35 [dev] cargo args: ["--profile", "server-dev", "--verbose", "--features", "dioxus/server", "--bin", "engine-test"]
14:01:35 [dev] Cargo build failed - no output location
14:01:35 [dev] Setting builder to failed state
14:01:35 [dev] Build failed: Other(Build did not return an executable)
╭────────────────────────────────────────────────────────────────────────────────────────── /:more ╮
│ App: ━━━━━━━━━━━━━━━━━━━━━━━━━━ ❌ Platform: Web + fullstack │
│ Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━ ❌ App features: ["web"] │
│ Status: Failed Serving at: http://127.0.0.1:8080 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
Expected behavior
serve without build error
Screenshots
Environment:
- Dioxus version: v0.6.0
- Rust version: rustc 1.83.0 (90b35a623 2024-11-26)
- OS info: arch linux
- App platform: fullstack
Questionnaire
i notify that dioxus v0.6.1 was released an retry this with the new version. But i hit the another issue:
❯ dx --version
dioxus 0.6.1 (was built without git repository)
❯ dx new engine-test4
✔ 🤷 Which sub-template should be expanded? · Bare-Bones
✔ 🤷 Do you want to use Dioxus Fullstack? · true
✔ 🤷 Do you want to use Dioxus Router? · false
✔ 🤷 Do you want to use Tailwind CSS? · false
✔ 🤷 Which platform do you want DX to serve by default? · Web
11.262s INFO Generated project at /home/lukas/git/engine-test4
`cd` to your project and run `dx serve` to start developing.
If using Tailwind, make sure to run the Tailwind CLI.
More information is available in the generated `README.md`.
Build cool things! ✌️
❯ cd engine-test4/
❯ dx serve --platform web
14:23:23 [dev] -----------------------------------------------------------------
Serving your Dioxus app: engine-test4 🚀
• Press `ctrl+c` to exit the server
• Press `r` to rebuild the app
• Press `o` to open the app
• Press `v` to toggle verbose logging
• Press `/` for more commands and shortcuts
Learn more at https://dioxuslabs.com/learn/0.6/getting_started
----------------------------------------------------------------
14:23:23 [dev] Installing wasm-bindgen-cli@0.2.99...
14:23:24 [dev] wasm-bindgen-cli@0.2.99 was successfully installed from GitHub.
14:23:25 [cargo] error: failed to select a version for the requirement `dioxus-liveview = "^0.6.1"`
14:23:25 [cargo] candidate versions found which didn't match: 0.6.0, 0.6.0-rc.0, 0.6.0-alpha.5, ...
14:23:25 [cargo] location searched: crates.io index
14:23:25 [cargo] required by package `dioxus v0.6.1`
14:23:25 [cargo] ... which satisfies dependency `dioxus = "^0.6.0"` (locked to 0.6.1) of package `engine-test4 v0.1.0 (/home/lukas/git/engine-test4)`
14:23:25 [cargo] if you are looking for the prerelease package it needs to be specified explicitly
14:23:25 [cargo] dioxus-liveview = { version = "0.6.0-rc.0" }
14:23:25 [dev] Cargo build failed - no output location. Toggle tracing mode (press `t`) for more information.
14:23:25 [dev] Build failed: Other(Build did not return an executable)
╭────────────────────────────────────────────────────────────────────────────────────────── /:more ╮
│ App: ━━━━━━━━━━━━━━━━━━━━━━━━━━ ❌ Platform: Web + fullstack │
│ Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━ ❌ App features: ["web"] │
│ Status: Failed Serving at: http://127.0.0.1:8080 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
✘ dx serve --platform web --verbose
14:26:40 [dev] Loading crate
14:26:40 [dev] Found package NodeIndex(46)
14:26:40 [dev] Could not find explicit feature for platform server, passing `fallback` instead
14:26:40 [dev] Verifying tooling...
14:26:40 [dev] Watching path "/home/lukas/git/engine-test4/Cargo.toml"
14:26:40 [dev] Watching path "/home/lukas/git/engine-test4/Dioxus.toml"
14:26:40 [dev] Watching path "/home/lukas/git/engine-test4/README.md"
14:26:40 [dev] Watching path "/home/lukas/git/engine-test4/assets"
14:26:40 [dev] Watching path "/home/lukas/git/engine-test4/src"
14:26:40 [dev] Watching path "/home/lukas/git/engine-test4"
14:26:40 [dev] -----------------------------------------------------------------
Serving your Dioxus app: engine-test4 🚀
• Press `ctrl+c` to exit the server
• Press `r` to rebuild the app
• Press `o` to open the app
• Press `v` to toggle verbose logging
• Press `/` for more commands and shortcuts
Learn more at https://dioxuslabs.com/learn/0.6/getting_started
----------------------------------------------------------------
14:26:40 [dev] Running build command...
14:26:40 [dev] Building app...
14:26:40 [dev] Initialized Root dir: "/home/lukas/git/engine-test4/target/dx/engine-test4/debug/web/public"
14:26:40 [dev] Initialized Exe dir: "/home/lukas/git/engine-test4/target/dx/engine-test4/debug/web/public/wasm"
14:26:40 [dev] Initialized Asset dir: "/home/lukas/git/engine-test4/target/dx/engine-test4/debug/web/public/assets"
14:26:40 [dev] Executing cargo...
14:26:40 [dev] cargo args: ["--profile", "wasm-dev", "--target", "wasm32-unknown-unknown", "--verbose", "--features", "web", "--bin", "engine-test4"]
14:26:40 [dev] Building server...
14:26:40 [dev] Building app...
14:26:40 [dev] Executing cargo...
14:26:40 [dev] cargo args: ["--profile", "server-dev", "--verbose", "--features", "dioxus/server", "--bin", "engine-test4"]
14:26:41 [dev] cargo args: ["--profile", "wasm-dev", "--target", "wasm32-unknown-unknown", "--verbose", "--features", "web", "--bin", "engine-test4"]
14:26:41 [dev] cargo args: ["--profile", "server-dev", "--verbose", "--features", "dioxus/server", "--bin", "engine-test4"]
14:26:41 [cargo] error: failed to select a version for the requirement `dioxus-liveview = "^0.6.1"`
14:26:41 [cargo] candidate versions found which didn't match: 0.6.0, 0.6.0-rc.0, 0.6.0-alpha.5, ...
14:26:41 [cargo] location searched: crates.io index
14:26:41 [cargo] required by package `dioxus v0.6.1`
14:26:41 [cargo] ... which satisfies dependency `dioxus = "^0.6.0"` (locked to 0.6.1) of package `engine-test4 v0.1.0 (/home/lukas/git/engine-test4)`
14:26:41 [cargo] if you are looking for the prerelease package it needs to be specified explicitly
14:26:41 [cargo] dioxus-liveview = { version = "0.6.0-rc.0" }
14:26:41 [dev] Cargo build failed - no output location. Toggle tracing mode (press `t`) for more information.
14:26:41 [dev] Setting builder to failed state
14:26:41 [dev] Build failed: Other(Build did not return an executable)
╭────────────────────────────────────────────────────────────────────────────────────────── /:more ╮
│ App: ━━━━━━━━━━━━━━━━━━━━━━━━━━ ❌ Platform: Web + fullstack │
│ Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━ ❌ App features: ["web"] │
│ Status: Failed Serving at: http://127.0.0.1:8080 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
move the v0.6.1 problem to its own issue: #3391
try running the build with --trace
, it might give you a better error message (e.g. missing some system library/executable)
my existing dioxus v0.6.0 project build. so i assume that no system libary is missing.
however i run the command with --trace
again:
❯ dx --version
dioxus 0.6.0 (was built without git repository
❯ dx serve --platform web --trace
14:51:24 [dev] failed to read `dioxus/settings.toml` config file
14:51:24 [dev] Autodetecting platform from feature asset
14:51:24 [dev] Autodetecting platform from feature default
14:51:24 [dev] Autodetecting platform from feature devtools
14:51:24 [dev] Autodetecting platform from feature document
14:51:24 [dev] Autodetecting platform from feature file_engine
14:51:24 [dev] Autodetecting platform from feature fullstack
14:51:24 [dev] Autodetecting platform from feature hooks
14:51:24 [dev] Autodetecting platform from feature html
14:51:24 [dev] Autodetecting platform from feature launch
14:51:24 [dev] Autodetecting platform from feature logger
14:51:24 [dev] Autodetecting platform from feature macro
14:51:24 [dev] Autodetecting platform from feature mounted
14:51:24 [dev] Autodetecting platform from feature signals
14:51:24 [dev] -----------------------------------------------------------------
Serving your Dioxus app: engine-test5 🚀
• Press `ctrl+c` to exit the server
• Press `r` to rebuild the app
• Press `o` to open the app
• Press `v` to toggle verbose logging
• Press `/` for more commands and shortcuts
Learn more at https://dioxuslabs.com/learn/0.6/getting_started
----------------------------------------------------------------
14:51:25 [dev] Rust cargo args: Command {
std: Command {
program: "cargo",
args: [
"cargo",
"rustc",
"--message-format",
"json-diagnostic-rendered-ansi",
"--profile",
"wasm-dev",
"--target",
"wasm32-unknown-unknown",
"--verbose",
"--features",
"web",
"--bin",
"engine-test5",
],
cwd: Some(
"/home/lukas/git/engine-test5",
),
create_pidfd: false,
},
kill_on_drop: false,
}
14:51:25 [dev] Rust cargo args: Command {
std: Command {
program: "cargo",
args: [
"cargo",
"rustc",
"--message-format",
"json-diagnostic-rendered-ansi",
"--profile",
"server-dev",
"--verbose",
"--features",
"dioxus/server",
"--bin",
"engine-test5",
],
cwd: Some(
"/home/lukas/git/engine-test5",
),
create_pidfd: false,
},
kill_on_drop: false,
}
14:51:25 [cargo] Blocking waiting for file lock on package cache
14:51:25 [cargo] Blocking waiting for file lock on package cache
14:51:25 [cargo] error: failed to select a version for the requirement `dioxus-liveview = "^0.6.1"`
14:51:25 [cargo] candidate versions found which didn't match: 0.6.0, 0.6.0-rc.0, 0.6.0-alpha.5, ...
14:51:25 [cargo] location searched: crates.io index
14:51:25 [cargo] required by package `dioxus v0.6.1`
14:51:25 [cargo] ... which satisfies dependency `dioxus = "^0.6.0"` (locked to 0.6.1) of package `engine-test5 v0.1.0 (/home/lukas/git/engine-test5)`
14:51:25 [cargo] if you are looking for the prerelease package it needs to be specified explicitly
14:51:25 [cargo] dioxus-liveview = { version = "0.6.0-rc.0" }
14:51:25 [dev] Cargo build failed - no output location
14:51:25 [dev] Build failed: Other(Build did not return an executable)
looks like it the same issue as with the v0.6.1 cli. The different is that the newer cli version print the relevant error by default.
so i close this issue at favor of #3391