我刚刚在我的mac上安装了stagehand并且安装顺利完成,但是当我尝试使用它来生成一个新的dart应用程序时,我得到了这个错误-bash: stagehand: command not found
。有任何想法吗?
我查看了我的机器,stagehand在〜/ .pub-cache / bin中我认为我必须手动添加到我的.profile:
export PATH=$PATH:~/.pub-cache/bin
(编辑:我刚刚在pub
网页上找到了确认信息:https://www.dartlang.org/tools/pub/cmd/pub-global#running-a-script-from-your-path)
我也在Mac上。我这样做了:
brew tap dart-lang/dart
brew install dart
stagehand
zsh: command not found: stagehand
然后这个命令修复了它:
pub global activate stagehand
它现在有效:
stagehand
Welcome to Stagehand!