vite: [docs]: pnpm create execution problem

Describe the bug

use

pnpm create vite my-vue-app -- --template vue

result

ERROR   ERROR  Unknown option: 'template'
Did you mean 'test-pattern'? Use "--config.unknown=value" to force an unknown option.

Reproduction

https://vitejs.cn/guide/#scaffolding-your-first-vite-project

System Info

System:
    OS: Windows 10 10.0.22598
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Memory: 4.85 GB / 15.75 GB
  Binaries:
    Node: 16.9.0 - F:\nodejs\node.EXE
    Yarn: 1.22.18 - F:\nodejs\yarn.CMD
    npm: 7.21.1 - F:\nodejs\npm.CMD
  Browsers:
    Edge: 44.22598.200.0
    Internet Explorer: 11.0.22598.1

Used Package Manager

pnpm

Logs

No response

Validations

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 24 (9 by maintainers)

Most upvoted comments

Also in PowerShell, you can just use --- instead of --. No quotes needed.

pnpm create vite my-vue-app --- --template vue

I think you need to run with " for windows + powershell. It works for me.

pnpm create vite my-vue-app "--" "--template" vue

CMD works without " though.