alloy "command not found"

You must Login before you can answer or comment on any questions.

I'm trying out alloy and installed node via homebrew and then ran the npm installing alloy via the command: npm install alloy -g

I am getting no error when i run the npm install.

I then create a new mobile project and try to run command "alloy new" as the documentation suggests (http://projects.appcelerator.com/alloy/docs/Alloy-bootstrap/index.html) and I get the error: alloy: command not found

Am I missing something

— asked 7 months ago by Joe Lee
0 Comments

3 Answers

Accepted Answer

the full command should be

sudo npm install -g alloy
after which you should be able to run which alloy to find alloy and alloy --version to confirm its version.

— answered 7 months ago by Tony Lukasavage
answer permalink
4 Comments
  • I had tried that before but I just notice that the last line of output from the install is: /usr/local/share/npm/bin/alloy -> /usr/local/share/npm/lib/node_modules/alloy/bin/alloy

    It seems like hasnt created the link for the alloy command, how do I link I link it so that alloy runs the correct command globally?

    — commented 7 months ago by Joe Lee

  • if which alloy is not showing you the alloy installation, you could just add /usr/local/share/npm/bin to your PATH environment variable. Seems like homebrew is installing to an unexpected location, but the environment variable pointing to it should resolve it.

    — commented 7 months ago by Tony Lukasavage

  • Sorry, not the most able of terminal users but I thought I could do something like this in my .bashrc? :

    export PATH="$PATH:/usr/local/share/npm/bin"

    ?

    — commented 7 months ago by Joe Lee

  • Show 1 more comment

Turns out I need to add it to the .profile

export PATH="$PATH:/usr/local/share/npm/bin"

Restarted terminal and it worked!

this worked for me, but i had to create the .profile file in my home directory (Mac OSX Mountain Lion) and added 1 line to it (without quotes as shown in the answer above): PATH=$PATH:/usr/local/bin/

Your Answer

Think you can help? Login to answer this question!