Osborne Saka
Osborne Saka

Reputation: 509

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

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.

Upvotes: 7

Views: 15368

Answers (4)

Harry Annan
Harry Annan

Reputation: 11

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.

Upvotes: 1

Ethan Cohen
Ethan Cohen

Reputation: 21

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

Upvotes: 1

Sumit Shrestha
Sumit Shrestha

Reputation: 396

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.

Upvotes: 1

Javis Perez
Javis Perez

Reputation: 4350

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.

Upvotes: 18

Related Questions