最近在看vue,因为后端现在事情也不是很多,看了好几次vue了,都没看成功!最近两周又闲暇了有时间,就把前端这块补一补,但是在用vue-cli脚手架创建项目的时候报“zsh: command not found: vue”,很轻松解决,顺便做个记录 报错:
lee@leedeMacBook-Pro cli % vue create Test01
zsh: command not found: vue
用npm把vue在本机重新安装一下即可
sudo npm install -g vue-cli
Password:
npm WARN deprecated vue-cli@2.9.6: This package has been deprecated in favour of @vue/cli
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated consolidate@0.14.5: Please upgrade to consolidate v1.0.0+ as it has been modernized with several long-awaited fixes implemented. Maintenance is supported by Forward Email at https://forwardemail.net ; follow/watch https://github.com/ladjs/consolidate for updates and release changelog
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
added 234 packages in 8s
lee@leedeMacBook-Pro ~ % vue -help
Usage: vue <command> [options]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
init generate a new project from a template
list list available official templates
build prototype a new project
create (for v3 warning only)
help [cmd] display help for [cmd]
执行help弹出如下界面,表示安装成功,可以继续操作别的内容了
还没有人发表评论