I have installed yarn in Windows 10 using the command npm install --global yarn
and checked the version using yarn --version
and it Shows the version information in the command. Then I tried to create a vite application using the following command: yarn create vite
but it showed the following error in cmd. If you know please give me the solution. I tried uninstalling and reinstalling yarn but the same error occurred. Thanks.
This is an error in cmd:
C:\DevProjects>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@4.3.2" with binaries: -create-vite -cva [##] 2/2'C:\Users\Graphic' is not recognized as an internal or external command, operable program or batch file. error Command failed. Exit code: 1 Command: C:\Users\Graphic Doctor\AppData\Local\Yarn\bin\create-vite Arguments: Directory: C:\DevProjects Output: info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command. C:\DevProjects>
I had the same problem but couldn't find a way to solve it via CLI.
If you really insist on using the Vite/Yarn combo, here’s how I do it:
Good luck!