How to fix error " No such file or directory error" with vue-cli create
Asked Answered
A

4

7

I installed vue-cli 3. I tried creating a vue app with vue create but I get a no such file error.

~$ vue create hello-world
bash: /usr/local/bin/vue: No such file or directory

Installing vue/cli3

yarn global v0.15.1
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed @vue/[email protected] with binaries:
      - vue
Done in 1.69s.
Alleneallentown answered 14/10, 2019 at 23:35 Comment(3)
"I installed vue-cli 3" 👈 doesn't sound like it worked. How did you install it?Hoey
Did you install vue-cli 3 global? npm install -g @vue/cliSlough
yes I did install vue-cli 3Alleneallentown
S
18

I hope this helps somebody but the same happened to me, I just had to restart the terminal before attempting to use it. I mean, after install vue-cli with npm i -g @vue/cli restart the terminal or update the source with something like: source ~/.bash_profile (or just restart the terminal, is easier) so the path in your profile gets updated :). That fixed it for me.

Scuttlebutt answered 17/4, 2020 at 14:59 Comment(0)
P
1

After installing vue-cli with npm i -g @vue/cli and update the source with something like source ~/.profile or (~/.bash_profile). That worked for me.

Phobia answered 23/2, 2021 at 12:50 Comment(0)
T
1

I just solved this error by simply adding sudo like sudo npm update -g @vue/cli #OR sudo yarn global upgrade --latest @vue/cli

Telamon answered 17/9, 2021 at 16:30 Comment(0)
I
1

For anyone comming in here 3 years later like I,

From the Vue CLI installation page as of March 2023, there is a message at the top of the page saying

⚠️ Vue CLI is in Maintenance Mode!

For new projects, it is now recommended to use create-vue to scaffold Vite-based projects. Also refer to the Vue 3 Tooling Guide for the latest recommendations. I did that and followed the prompts to create my first Vue project.

Irradiate answered 3/3, 2023 at 14:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.