美文网首页
Mac环境AngularCLi ng命令找不到

Mac环境AngularCLi ng命令找不到

作者: ChangLau | 来源:发表于2018-08-31 16:45 被阅读122次
  • 获取npm安装路径
  • 修改ng命令别名指向

通过如上设置就可以访问了

➜  ~ npm get prefix
/usr/local/Cellar/node/10.9.0
➜  ~ alias ng="/usr/local/Cellar/node/10.9.0/lib/node_modules/@angular/cli/bin/ng"
➜  ~ ng
Available Commands:
  add Add support for a library to your project.
  new Creates a new directory and a new Angular app.
  generate Generates and/or modifies files based on a schematic.
  update Updates your application and its dependencies.
  build Builds your app and places it into the output path (dist/ by default).
  serve Builds and serves your app, rebuilding on file changes.
  test Run unit tests in existing project.
  e2e Run e2e tests in existing project.
  lint Lints code in existing project.
  xi18n Extracts i18n messages from source code.
  run Runs Architect targets.
  eject Temporarily disabled. Ejects your app and output the proper webpack configuration and scripts.
  config Get/set configuration values.
  help Help.
  version Outputs Angular CLI version.
  doc Opens the official Angular API documentation for a given keyword.

For more detailed help run "ng [command name] --help"
➜  ~

相关文章

网友评论

      本文标题:Mac环境AngularCLi ng命令找不到

      本文链接:https://www.haomeiwen.com/subject/dgqewftx.html