Giter VIP home page Giter VIP logo

Comments (13)

yaoye6262 avatar yaoye6262 commented on July 25, 2024

dioxus create project_name

but got this error:
`Found argument 'create' which wasn't expected, or isn't valid in this context

USAGE:
dioxus [FLAGS]

For more information try --help`

from cli.

mrxiaozhuox avatar mrxiaozhuox commented on July 25, 2024

dioxus create project_name

but got this error: `Found argument 'create' which wasn't expected, or isn't valid in this context

USAGE: dioxus [FLAGS]

For more information try --help`

can you show me the dioxus --help context ?

from cli.

mrxiaozhuox avatar mrxiaozhuox commented on July 25, 2024

I just installed dioxus-cli on my macbook pro (os version 12.2.1 (21D62)).

I tried running

dioxus create someproject

but got this error:

error: Found argument 'gh:dioxuslabs/dioxus-template' which wasn't expected, or isn't valid in this context

USAGE:
    cargo generate [FLAGS] [OPTIONS] --git <git>

For more information try --help
[ERROR] create error: Generate project failed.

Same thing happens when I provide the --template option.

Can you check if cargo generate Is installed on your os ?

from cli.

maccesch avatar maccesch commented on July 25, 2024

@mrxiaozhuox I just confirmed. It is installed. This is the output of dioxus --help:

dioxus 
Build, bundle, & ship your Dioxus app

USAGE:
    dioxus [OPTIONS] <SUBCOMMAND>

OPTIONS:
    -h, --help    Print help information
    -v            Enable verbose logging

SUBCOMMANDS:
    build        Build the Rust WASM app and all of its assets
    clean        Clean output artifacts
    config       Dioxus config file controls
    create       Init a new project for Dioxus
    help         Print this message or the help of the given subcommand(s)
    serve        Build, watch & serve the Rust WASM app and all of its assets
    translate    Translate some source file into Dioxus code

from cli.

maccesch avatar maccesch commented on July 25, 2024

@yaoye6262 You probably installed the latest release version where the generate command isn't included yet. That's why I installed the latest directly from github but got the error mentioned above.

from cli.

yaoye6262 avatar yaoye6262 commented on July 25, 2024

dioxus --help context:

`
dioxus 0.1.1
Build, bundle, & ship your Dioxus app

USAGE:
dioxus [FLAGS]

FLAGS:
-h, --help Prints help information
-v Enable verbose logging
-V, --version Prints version information

SUBCOMMANDS:
help Prints this message or the help of the given subcommand(s)
translate Translate some source file into Dioxus code
`

from cli.

yaoye6262 avatar yaoye6262 commented on July 25, 2024

@maccesch @mrxiaozhuox

OK!Has been resolved!

from cli.

maccesch avatar maccesch commented on July 25, 2024

I'm still getting the same error

from cli.

mrxiaozhuox avatar mrxiaozhuox commented on July 25, 2024

@yaoye6262 You probably installed the latest release version where the generate command isn't included yet. That's why I installed the latest directly from github but got the error mentioned above.

can you try to change generate version to the latest version ?

from cli.

maccesch avatar maccesch commented on July 25, 2024

I updated rust and cargo-generate to the latest versions and now it works.

Should there be a check that you have the correct version of cargo-generate installed?

from cli.

mrxiaozhuox avatar mrxiaozhuox commented on July 25, 2024

I updated rust and cargo-generate to the latest versions and now it works.

Should there be a check that you have the correct version of cargo-generate installed?

yes, dioxus-cli will install the latest generate, probably because you've installed it before

from cli.

maccesch avatar maccesch commented on July 25, 2024

yes, makes sense. What I wanted to say is this:

When dioxus generate is called, it should check if the installed version of cargo-generate is up to date.

from cli.

mrxiaozhuox avatar mrxiaozhuox commented on July 25, 2024

yes, makes sense. What I wanted to say is this:

When dioxus generate is called, it should check if the installed version of cargo-generate is up to date.

yes ! good idea !! 😄

from cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.