create-single-spa icon indicating copy to clipboard operation
create-single-spa copied to clipboard

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

Open rfrankspk opened this issue 3 years ago • 2 comments

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

rfrankspk avatar May 15 '22 05:05 rfrankspk

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?

Garlant avatar Oct 04 '22 19:10 Garlant

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

cgfeel avatar Jun 02 '24 09:06 cgfeel

Wasn't able to replicate the error

internettrans avatar Sep 23 '24 20:09 internettrans