vitejs / vite

Next generation frontend tooling. It's fast!
http://vitejs.dev
MIT License
67.48k stars 6.08k forks source link

bug: create-vue init project error #11129

Closed wbxl2000 closed 1 year ago

wbxl2000 commented 1 year ago

Describe the bug

when using create vite, i choose framework "vue" and "Customize with create-vue", complete the all steps then, i got a error:

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type number (1)
    at new NodeError (node:internal/errors:372:5)
    at validateString (node:internal/validators:120:11)
    at Object.join (node:path:1172:7)
    at init (/Users/qilongyu/.config/yarn/global/node_modules/create-vue/outfile.cjs:4041:22)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  code: 'ERR_INVALID_ARG_TYPE'
}

no matter which options i choose i always got this (after "Customize with create-vue")

image

Reproduction

nope

Steps to reproduce

yarn create vite
yarn create v1.22.19 [1/4] šŸ” Resolving packages... [2/4] šŸšš Fetching packages... [3/4] šŸ”— Linking dependencies... [4/4] šŸ”Ø Building fresh packages... success Installed "create-vite@3.2.1" with binaries:

success Installed "create-vue@3.4.1" with binaries:

āœ” Add TypeScript? ā€¦ No / Yes āœ” Add JSX Support? ā€¦ No / Yes āœ” Add Vue Router for Single Page Application development? ā€¦ No / Yes āœ” Add Pinia for state management? ā€¦ No / Yes āœ” Add Vitest for Unit Testing? ā€¦ No / Yes āœ” Add an End-to-End Testing Solution? ā€ŗ No āœ” Add ESLint for code quality? ā€¦ No / Yes TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type number (1) at new NodeError (node:internal/errors:372:5) at validateString (node:internal/validators:120:11) at Object.join (node:path:1172:7) at init (/Users/qilongyu/.config/yarn/global/node_modules/create-vue/outfile.cjs:4041:22) at processTicksAndRejections (node:internal/process/task_queues:96:5) { code: 'ERR_INVALID_ARG_TYPE' }

System Info

System:
    OS: macOS 13.0.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 21.47 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.16.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.11.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 107.0.5304.121
    Safari: 16.1

Used Package Manager

yarn

Logs

No response

Validations

sapphi-red commented 1 year ago

This is an bug in create-vue. I reported there (https://github.com/vuejs/create-vue/issues/201).

wbxl2000 commented 1 year ago

This is an bug in create-vue. I reported there (vuejs/create-vue#201).

When I use create-vue on its own, I don't get this error, so I put this issue here

sapphi-red commented 1 year ago

You can reproduce the error by running yarn create vue 1.

wbxl2000 commented 1 year ago

oh yes, got it, thank you