DioxusLabs / dioxus

Fullstack app framework for web, desktop, mobile, and more.
https://dioxuslabs.com
Apache License 2.0
20.19k stars 773 forks source link

Megathread: cli 0.6.0-alpha quirks/issues/ux/perf #2788

Open jkelleyrtp opened 1 month ago

jkelleyrtp commented 1 month ago

Problem

We have a number of quirks / bugs in the CLI post-rewrite that need to be resolved before releasing to the general public.

This issue is where we put them.

Andrew15-5 commented 1 month ago

Fullstack is just broken due to a port forwarding issue

Is this the same as (I no longer think it's the same issue and I don't have the port forwarding issue):

Andrew15-5 commented 1 month ago

I will put non-CLI issues here (but they are emerged from dx serve):

Notes:

DogeDark commented 4 weeks ago

Add to the list:

FragrantArmpit commented 3 weeks ago

Another thing to discuss: #2857

dbcfd commented 1 week ago

Fullstack is just broken due to a port forwarding issue

Is this the same as (I no longer think it's the same issue and I don't have the port forwarding issue):

* [x]  "Failed to find index.html" Fullstack panic
  ```
  [app] thread 'main' panicked at /cargo/git/checkouts/dioxus-1e619ce595d3799d/bd58a92/packages/fullstack/src/serve_config.rs:91:37:
  [app] 2024-08-04T12:04:46.395679Z  WARN dioxus_cli_config: A library is trying to access the crate's configuration, but the dioxus CLI was not used to build the application.
  [app] Failed to find index.html. Make sure the index_path is set correctly and the WASM application has been built.: Os { code: 2, kind: NotFound, message: "No such file or directory" }
  [app] note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  ```

I have been able to work around this in 0.6.0-alpha.2 by setting out_dir to dist/public. It looks like https://github.com/DioxusLabs/dioxus-template/pull/44 should be adjusted to use this since https://github.com/DioxusLabs/dioxus/blob/1dfa1b5e7f39b8ccd2e6b18bd9077d05e82d5504/packages/fullstack/src/serve_config.rs#L57 will use public_path() if index_path is not set.

Update: This only works once. If dist/public exists, then next build will try to find the index in dist/public/public. It seems you need a build with out_dir for dist/public then set out_dir back to dist.