vuejs / docs

📄 Documentation for Vue 3

Home Page:https://vuejs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create project with yarn

khaicm-0897 opened this issue · comments

I'm starting a project with yarn. I followed the instructions on Vue's homepage
https://vuejs.org/guide/quick-start#creating-a-vue-application
with command: yarn create vue@latest vue3-base
but when I run the above command I receive an error message as follows

yarn create v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...

success Installed "create-vue@3.10.3" with binaries:
 - create-vue
/bin/sh: 1: /home/rubin/.yarn/bin/create-vue@latest: not found
error Command failed.
Exit code: 127
Command: /home/rubin/.yarn/bin/create-vue@latest
Arguments: vue3-base
Directory: /home/rubin/workspace
Output:

Then I did some research and it seemed like this command was incorrectly describing the process of initializing a vue project with yarn.
I found a way and fixed it, the process is as follows:

 yarn add create-vue // Add create-vue from registry yarn
yarn create vue vue3-base // Create project with name vue3-base

Please consider my issue, if necessary I can push pull to rewrite this installation guide. thank you

@khaicm-0897 Based on your command output you are using - yarn create v1.22.22 - that is classic yarn (version 1), latest is 4.2.2

Yarn version 1 don't support feature flags, you can upgrade your yarn version

Reference: vuejs/create-vue#502

@Yordan-Ramchev Thank you for your reply, sorry for just replying now as I have found a way to fix it with my current version. I just tried updating the version as you wanted and creating a new project and everything went well. I think I will close this issue here thanks