After installing vue CLI 3 I was unale to vue create my-app
throwing this error zsh: command not found: vue
But when installing the vue CLI I notice this error:
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
/home/b-hantsi/.npm-global/bin/vue -> /home/b-hantsi/.npm-global/lib/node_modules/@vue/cli/bin/vue.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/@vue/cli/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN @vue/compiler-sfc@3.0.5 requires a peer of vue@3.0.5 but none is installed. You must install peer dependencies yourself.
+ @vue/cli@4.5.11
updated 1 package in 138.616s
The one that you shared...it generally shows up when you install vue-cli. The reason that you are unable to create a project is because you probably might have not installed it globally. So try running the below command in the command line inside the directory where you are trying to create a vue project
vue --version
After running the above command if it doesn't show any version number like 4.5.1 etc. Then it means the vue was not installed globally. So then you need to run the following commands to have it installed globally. If you are using yarn then run the yarn commands else the npm commands
yarn remove global @vue/cli OR
npm uninstall -g @vue/cli
yarn add global @vue/cli OR
npm install -g @vue/cli
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.