【发布时间】:2021-04-28 11:03:33
【问题描述】:
安装 vue CLI 3 后,我无法 vue create my-app 抛出此错误 zsh: command not found: vue
但是在安装 vue CLI 时,我注意到了这个错误:
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
【问题讨论】:
-
你运行了哪个命令来安装 vue-cli?
-
npm install -g @vue/cli
标签: node.js vue.js npm vue-cli-3