Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • 1
    .bash_profile is only run for login shells. Terminal creates login shells, but AppleScript do shell script does not. You either need to add the relevant init steps to the do shell script section, or add them to .bashrc (which runs for non-login shells). It's for reasons like this that it's common to either have .bash_profile run .bashrc (and put the init script steps in .bashrc) or vice versa. But you should rewrite it so it doesn't add things to PATH over & over. See this question. Commented Jun 25, 2019 at 21:23
  • I’m going to try and clarify things and remove the TIA / chit chat. Thanks for being gracious - but the site prefers no tags / signatures and you can put that all in your linked profile if needed. Commented Jun 25, 2019 at 21:25
  • It’s a shell/env issue indeed. Nothing node specific. Commented Jun 27, 2019 at 8:58
  • Your path setting should be in ~/.bashrc. Running from desktop ie via automator does not go through a login shell so nothing in ~/.bash_profile is loaded. For the terminal ~/.bash_profile will be read - and that needs to source ~/.bashrc to save typing the commands twice. Commented Jun 27, 2019 at 10:35
  • Thank you, John; that was my assumption. Should I correct the title? What do you suggest? Commented Jun 27, 2019 at 20:29