我正在尝试使用以下命令安装Vue CLInpm install -g @vue/CLI.
我从终端得到以下输出:npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
changed 1412 packages, and audited 1413 packages in 26s
61 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
然后运行vue——version并得到以下输出:
zsh: command not found: vue
我使用的是NPM v 7.5.1。
谢谢
我不确定这个是否有帮助:https://stackoverflow.com/a/62495033/8816585
sudo npm install -g @vue/cli --unsafe-perm
或者尝试安装它与纱线:yarn global add @vue/cli