vuejs / create-vue

🛠️ The recommended way to start a Vite-powered Vue project
Other
3.73k stars 426 forks source link

yarn installation process gives warnings #213

Closed kajojify closed 1 year ago

kajojify commented 1 year ago

Hello!

I decided to create a new Vue project with help of create-vue and yarn tools. I ran yarn create vue@latest then set the following options: ✔ Project name: … vue-project ✔ Add TypeScript? … Yes ✔ Add JSX Support? … Yes ✔ Add Vue Router for Single Page Application development? … Yes ✔ Add Pinia for state management? … Yes ✔ Add Vitest for Unit Testing? … No ✔ Add an End-to-End Testing Solution? › No ✔ Add ESLint for code quality? … Yes ✔ Add Prettier for code formatting? … Yes

Then I went to vue-project folder, ran yarn command and saw this: image

Is there anything I can do to quickly fix this? Thank you.

haoqunjiang commented 1 year ago

I think these warnings can be safely ignored. They are mere warnings, after all.

If you are interested in more details:

kajojify commented 1 year ago

Hello. Thank you!

TwT-L commented 1 year ago

I get an error, When I run the yarn create vue@latest command.

yarn create v1.22.4
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning "create-umi > sylvanas > @umijs/fabric > eslint-plugin-compat@3.6.0" has incorrect peer dependency "eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0".
warning "create-umi > sylvanas > @umijs/fabric > eslint-plugin-jsx-a11y@6.2.3" has incorrect peer dependency "eslint@^3 || ^4 || ^5 || ^6".
[4/4] 🔨  Building fresh packages...
success Installed "create-vue@3.7.5" with binaries:
      - create-vue
/bin/sh: /usr/local/bin/create-vue@latest: No such file or directory
error Command failed.
Exit code: 127
Command: /usr/local/bin/create-vue@latest
Arguments:
Directory: /Users/lichin/Documents/code/test
Output:

info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.
haoqunjiang commented 1 year ago

Yarn v1 doesn't support appending @tag to the create command. So just use yarn create.

tomatobybike commented 8 months ago

Yarn v1 不支持附加@tagcreate命令。所以只需使用yarn create.

Good !!

jamesdongdong commented 6 months ago

https://cn.vuejs.org/guide/quick-start.html#:~:text=%24%20yarn%20create%20vue%40latest

The official documentation for Vue 3 still suggests using the command: yarn create vue@latest. Perhaps it would be beneficial to update the document?

Yordan-Ramchev commented 6 months ago

@jamesdongdong Latest yarn version is 4.1.1-dev, and it supports appending @tag. You can reference it here - https://yarnpkg.com/cli/add I don't think Vue doc needs to be updated.

yangmingshan commented 4 months ago

@jamesdongdong Latest yarn version is 4.1.1-dev, and it supports appending @tag. You can reference it here - https://yarnpkg.com/cli/add I don't think Vue doc needs to be updated.

But Yarn v4 does not support the yarn create command, you should use yarn dlx, so yarn create vue@latest is a wrong command anyway.

Should we update the documentation?

Yordan-Ramchev commented 4 months ago

Yarn's documentation not explicitly list yarn create under its own section due to the evolution of Yarn and its features, but yarn create is not deprecated and it's still working.

Using create command:

Screenshot 2024-06-15 at 10 57 58

Using yarn dlx for project initialization is a supported, and maybe yarn is moving in that direction.

Using dlx command (feature flags are working):

Screenshot 2024-06-15 at 10 57 33

Maybe creating an issue in https://github.com/vuejs/docs and reference this discussion would be a good starting point.