3

I am trying to install http://stagehand.pub

I change my Terminal path to :/Users/king/Desktop/dart/dart-sdk

I check to see if my PATH is change and run echo $PATH in terminal and I get

green:~ king$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/king/Desktop/dart/dart-sdk

I type pub global activate stagehand and the output is -bash: : command not found

UPDATED change path to /Users/king/Desktop/dart/dart-sdk/bin

to set up the path to include pub bin scripts all you do is enter this in terminal right? $ pub global activate stagehand

Anyways after I did that I tried to continue the tutorial on stagehand.pub and this is the result green:~ king$ pub global activate stagehand Package stagehand is currently active at version 0.1.2. Resolving dependencies... (2.8s)

args 0.12.0+2 bignum 0.0.6 cipher 0.7.1 collection 1.0.0 crypto 0.9.0 fixnum 0.9.0 path 1.3.0 stagehand 0.1.2 uuid 0.4.1 Precompiling executables... Loading source assets... Precompiled stagehand:stagehand. Activated stagehand 0.1.2. No such file or directory Command: chmod +x /Users/king/.pub-cache/bin/stagehand green:~ king$ cd /Users/king/dart green:dart king$ stagehand -o testapp webapp -bash: stagehand: command not found green:dart king$ Seems the command "stagehand -o webapp" is not found. :/ any suggestion?

My Full .bash_profile is this export PATH="/Users/king/Desktop/dart/dart-sdk/bin"

My Error is this -bash: stagehand: command not found green:dart king$

0

Can you please post the contents of your .bashrc/.zshrc? It will be easier if I can see how exactly your path is setup.

On my system, (because I put the Dart folder in /Applications), the location of the pub binary on my system is:

/Applications/dart/dart-sdk/bin

Also in order to execute pub, I have to do like so:

$ ./pub

  • my .bash_profile says export PATH=${PATH}:/Users/king/Desktop/dart/dart-sdk/ – bossk Oct 27 '14 at 20:49
  • Ok well first off, you need to make it: /Users/king/Desktop/dart/dart-sdk/bin. – damianesteban Oct 27 '14 at 21:02
  • Thanks I got farther but I still did something wrong :( any more errors you see? – bossk Oct 28 '14 at 3:23
  • What's the exact error you are getting, and can you post you entire .bash_profile please? You can modify your original question and add to it. – damianesteban Oct 29 '14 at 5:15
  • Okay updated with error and full bash_profile which is short – bossk Oct 29 '14 at 7:32
1

Your question is 'how to set up dart path.' I'll answer it only.(stagehand is another problem)

  1. Download dart-sdk zip.
  2. Extract zip.
  3. You can see ./dart-sdk/bin
  4. From bash, Set ./dart-sdk/bin to your PATH.

    add belows to your .bashrc

    export PATH="$PATH":/your_path/dart-sdk/bin

  5. Launch bash again. Alternatively, source .bashrc

  6. Run dart from prompt.

The result should be ...

dart Usage: dart

Executes the Dart script passed as .

Common options:

--checked or -c Insert runtime type checks and enable assertions (checked mode).

--help or -h Display this message (add -v or --verbose for information about all VM options).

--package-root= or -p Where to find packages, that is, "package:..." imports.

--version Print the VM version.

  • 1
    Thanks the error was I forgot to add the :$PATH at the end of my bash profile. So it suppose to look like this export PATH="$PATH":/your_path/dart-sdk/bin:$PATH – bossk Nov 14 '14 at 12:20
  • export PATH="$PATH":/your_path/dart-sdk/bin is enough. or PATH=$PATH:/your_path/dart-sdk/bin and then export PATH. – Sungguk Lim Nov 14 '14 at 12:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.