Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

dioxus create project-name fails, error message counterintuitive or wrong #93

Open
mgb-ingenuity opened this issue Jan 17, 2023 · 3 comments

Comments

@mgb-ingenuity
Copy link

Dioxus CLI currently has the following flow in the main README.md for creating a new project:

## Get Started 

Use `dioxus create project-name` to initialize a new Dioxus project. <br>

It will be cloned from the [dioxus-template](https://github.com/DioxusLabs/dioxus-template) repository.

<br>

Doing the following on my iMac, however, raises an error:

(base) MyDevice:dioxus mgb$ mkdir tests
(base) MyDevice:dioxus mgb$ cd tests
(base) MyDevice:tests mgb$ dioxus create foo
Error: Failed to load `dioxus.toml` because: Cargo Error: Failed to find the cargo directory

Shouldn't dioxus create be making the cargo directory in the first place? Additionally, isn't the toml config file Dioxus.toml, rather than (lowercase) dioxus.toml?

I've forked the repo and am willing to contribute changes to the documentation to make this clearer; seeking guidance from the main developers re: what the updates should be: mgbvox fork of dioxus cli

@ealmloff
Copy link
Member

This definitely seems like a bug. It is failing to load the dioxus config here: https://github.com/DioxusLabs/cli/blob/master/src/main.rs. I think that should be changed to either allow failing to load the config without panicing (and use the default config) or only load the config on some commands.

I think the only place the config is used there is load the plugins. I don't think the plugin system has any hooks for creating new packages, so we shouldn't even need to load it at all when running create (@mrxiaozhuox ?).

@mgbvox
Copy link
Contributor

mgbvox commented Jan 19, 2023

@Demonthos @mrxiaozhuox PR up that fixed this on my end, if you care to take a look!

@mrxiaozhuox
Copy link
Member

@Demonthos @mrxiaozhuox PR up that fixed this on my end, if you care to take a look!

Merged, thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants