尝试创建新应用程序时找不到stagehand命令

问题描述 投票:2回答:2

我刚刚在我的mac上安装了stagehand并且安装顺利完成,但是当我尝试使用它来生成一个新的dart应用程序时,我得到了这个错误-bash: stagehand: command not found。有任何想法吗?

dart
2个回答
11
投票

我查看了我的机器,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


2
投票

我也在Mac上。我这样做了:

brew tap dart-lang/dart
brew install dart
stagehand
  zsh: command not found: stagehand

然后这个命令修复了它:

pub global activate stagehand

它现在有效:

stagehand
  Welcome to Stagehand!
© www.soinside.com 2019 - 2024. All rights reserved.