Skip to content
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

npx create-single-spa@latest fails when creating a Vue application/parcel #359

Open
rfrankspk opened this issue May 15, 2022 · 2 comments
Open

Comments

@rfrankspk
Copy link

Describe the bug or question
npx create-single-spa@latest fails when creating a Vue application/parcel...

To Reproduce

npx create-single-spa
? Directory for new project .
? Select type to generate single-spa application / parcel
? Which framework do you want to use? vue
? Organization name (can use letters, numbers, dash or underscore) 
commure

Expected behavior
Vue parcel is created successfully.

Screenshots and/or console output

Richards-MacBook-Pro:vue-poc rfranks$ npx create-single-spa
? Directory for new project .
? Select type to generate single-spa application / parcel
? Which framework do you want to use? vue
? Organization name (can use letters, numbers, dash or underscore) 
commure
Usage: create [options] <app-name>

create a new project powered by vue-cli-service

Options:
  -p, --preset <presetName>       Skip prompts and use saved or remote preset
  -d, --default                   Skip prompts and use default preset
  -i, --inlinePreset <json>       Skip prompts and use inline JSON string as preset
  -m, --packageManager <command>  Use specified npm client when installing dependencies
  -r, --registry <url>            Use specified npm registry when installing dependencies (only for npm)
  -g, --git [message]             Force git initialization with initial commit message
  -n, --no-git                    Skip git initialization
  -f, --force                     Overwrite target directory if it exists
  -c, --clone                     Use git clone when fetching remote preset
  -x, --proxy                     Use specified proxy when creating project
  -b, --bare                      Scaffold project without beginner instructions
  -h, --help                      output usage information

  Unknown option --skipGetStarted.

Richards-MacBook-Pro:vue-poc rfranks$ npx create-single-spa@latest
Need to install the following packages:
  create-single-spa@latest
Ok to proceed? (y) 
? Directory for new project .
? Select type to generate single-spa application / parcel
? Which framework do you want to use? vue
? Organization name (can use letters, numbers, dash or underscore) 
commure
Usage: create [options] <app-name>

create a new project powered by vue-cli-service

Options:
  -p, --preset <presetName>       Skip prompts and use saved or remote preset
  -d, --default                   Skip prompts and use default preset
  -i, --inlinePreset <json>       Skip prompts and use inline JSON string as preset
  -m, --packageManager <command>  Use specified npm client when installing dependencies
  -r, --registry <url>            Use specified npm registry when installing dependencies (only for npm)
  -g, --git [message]             Force git initialization with initial commit message
  -n, --no-git                    Skip git initialization
  -f, --force                     Overwrite target directory if it exists
  -c, --clone                     Use git clone when fetching remote preset
  -x, --proxy                     Use specified proxy when creating project
  -b, --bare                      Scaffold project without beginner instructions
  -h, --help                      output usage information

  Unknown option --skipGetStarted.

Additional context

Richards-MacBook-Pro:vue-poc rfranks$ vue --version
3.3.0
@Garlant
Copy link

Garlant commented Oct 4, 2022

Hi,
I have a similiar issue. Except, I'm using a windows 10 system.

Behavior is as follows:

PS C:\Users\xxx\workspace\vue-parcel> create-single-spa      
? Directory for new project xx
? Select type to generate single-spa application / parcel
? Which framework do you want to use? vue
? Organization name (can use letters, numbers, dash or underscore) xx
PS C:\Users\xxx\workspace\vue-parcel> 

I cloned the project and had a look into why it is also happening on my machine...
There I found out that the error occurs only when @vue/cli is globally installed.

In case I had @vue/cli globally installed, it was using command vue and some lines below applied .cmd to command.

When it then tried to create the vue project, it failed because it could not find/recognize vue.cmd.
So, after removing the if-branch, including .cmd, it worked fine. With and without globally installed @vue/cli.

@rfrankspk Does it also occur to you, if there is no globally installed @vue/cli?

@cgfeel
Copy link

cgfeel commented Jun 2, 2024

update you local environment vue/cli
npm install -g @vue/cli

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

No branches or pull requests

3 participants