vue.jsvue-cli-3

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 fsevents@1.2.9: The platform "linux" is incompatible with this module.
info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed @vue/cli@3.12.0 with binaries:
      - vue
Done in 1.69s.

Solution

  • 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.