Worksheet issue after switching from MAMP Pro to Servbay

175 views
Skip to first unread message

Greg Raven

unread,
Mar 2, 2026, 10:03:29 AMMar 2
to BBEdit Talk
I used MAMP Pro for years in my local dev environment, and project worksheet commands (such as, to invoke js-beautify, netlify, and wrangler) worked fine. MAMP Pro's rough edges finally got to me, though, and I switched to Servbay, which in many cases seems to be a superior local environment.

However, even though I have PHP, Python, Node, Rust, and Go installed, worksheet commands that used to allow me to upload files to Netlify or Cloudflare, as well as format JavaScript and JSON files, no longer work. When I try to invoke them, I get either a "js-beautify not found" or "node not found" console error.

I don't mind (too much) having to copy-paste the upload commands, but I miss the JavaScript formatting.

I read the BBEdit documents, tried adding aliases and paths to my .zshrc file, putting the commands in worksheets, trying different command-line syntaxes, etc., but either I'm missing something or this is simply not possible to do, even though the commands do work just fine from the command line.

Anyone else run into this and come up with a solution?

Bruce Van Allen

unread,
Mar 2, 2026, 9:15:29 PMMar 2
to bbe...@googlegroups.com
I don't use MAMP Pro or Servbay, but I run many executables with BBEdit worksheets, including my own scripts in Perl, shell, Python, and JS, plus utilities I've installed. I usually put symbolic links to them in /usr/local/bin with
`sudo ln -s path/to/myscript /usr/local/bin/myscript`
so I can call them by name without their whole paths.

So this experience - tangental to yours - leads me to ask:

1. What answer do you get on the CLI to `which js-beautify`?

2. How were the utilities you want to use installed? Perhaps re-installing with Homebrew, independent of any dev environment, would do the trick (make sure `which` gets the right one).

3. Different machine? If you changed Intel -> Apple Silicon/ARM, you probably have a bunch of things to re-install.

HTH

— Bruce

_bruce__van_allen__santa_cruz_ca_
> --
> This is the BBEdit Talk public discussion group. If you have a feature request or believe that the application isn't working correctly, please email "sup...@barebones.com" rather than posting here. Follow @bbedit on Mastodon: <https://mastodon.social/@bbedit>
> ---
> You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+un...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/bbedit/73f20fde-982f-422d-bc1d-5cda0849e3b5n%40googlegroups.com.

Greg Raven

unread,
Mar 3, 2026, 8:43:09 AMMar 3
to BBEdit Talk
I hadn't thought of this approach. Using your example, I created these two lines:

sudo ln -s /Users/greg/Library/pnpm/js-beautify /usr/local/bin/js-beautify
sudo ln -s /Applications/ServBay/script/alias/node /usr/local/bin/node

Unfortunately, this did not work either.

I can re-install them with Homebrew, but I was hoping to avoid the duplication of having the same code installed by Servbay and by Homebrew (in different places, of course).

IMHO, the best approach would be to execute npx commands from BBEdit worksheets, so I don't have to install anything. I can't get that to work, though.

--- GR

GP

unread,
Mar 3, 2026, 4:31:39 PMMar 3
to BBEdit Talk
Hmm ... "paths to my .zshrc file" ...

Did you read BBEdit's Regarding environment variables when using “zsh”?

According to that, "BBEdit runs zsh as a non-interactive shell, zsh does not load ~/.zshrc" so you need to "move $PATH (and other environment settings) into ~/.zprofile" which will get loaded by zsh in a non-interactive invocation.

Also, did you install the ServBay CLI per the ServBay CLI: Installation, Configuration & Usage Guide?

Although the directions are slightly outdated (by referencing bash as the default MacOS shell), the context of applying "Install CLI Tool to zsh" seems to imply modifying .zshrc, which per the above BBEdit support document won't work to add Servbay's installed tools path to the invoked non-interactive shell's $PATH.

Without physically installing ServBay and checking what "Install CLI Tool to zsh" does, I assume that command modifies an existing ~/.zshrc file (or creates one if needed) by adding:

export PATH="/Applications/ServBay/script:$PATH"

to it, as the Servbay support Command-Line Tool: servbayctl article's Prerequisites section recommends.

With all that covered:

1. Check your ~/.zshrc file. Does it have the above export PATH command in it?

a. If so, move it to ~/.zprofile (creating the ~/.zprofile file if needed).

b. If not, check the ~/.zprofile file (if one exists) to see if the above export PATH command is in it. If the file or command doesn't exist, create the file (if necessary) and add the command to it.

2. Open the MacOS Terminal app and check the ServBay installed tools can be found using the now-configured ~/.zshrc and ~/.zprofile export PATH arrangement. (Tool version commands are one way to check.)

3. If 2. works, repeat with a BBEdit Shell Worksheet to check the ServBay installed tools can be found.

Greg Raven

unread,
Mar 3, 2026, 6:50:07 PMMar 3
to BBEdit Talk
I read the BBEdit documentation but did not understand it, so thanks for the explanation.

I'll try these steps and see if they don't improve the situation.

Much appreciated.

--- GR

Greg Raven

unread,
Mar 4, 2026, 4:27:08 PMMar 4
to BBEdit Talk
I copied the paths from .zshrc to .zprofile, but that changed nothing. I could always execute the Servbay commands in Terminal app ... still hoping to be able to reach them through a BBEdit shell worksheet, though.

For now, I have moved the commands from Unix Worksheet to Scratchpad, where I can copy and paste them into Terminal app.

Thanks for your help.

--- GR

On Tuesday, March 3, 2026 at 1:31:39 PM UTC-8 GP wrote:

jj

unread,
Mar 5, 2026, 3:22:45 AMMar 5
to BBEdit Talk
Hi Greg,

Did you compare the output of `env` in your Terminal and in the Worksheet?
This could give you some clues of what is missing or different.

HTH

Jean Jourdain

Greg Raven

unread,
Mar 6, 2026, 7:31:53 AMMar 6
to BBEdit Talk
Jean,

That would be nice. How does one do this to get this information?

GR

jj

unread,
Mar 6, 2026, 9:44:11 AMMar 6
to BBEdit Talk
Greg,

Just type env in the Terminal or the Worksheet and then <return> or <enter>.

For the documentation type man env in the terminal.

HTH

Jean Jourdain

Greg Raven

unread,
Mar 7, 2026, 5:33:45 PMMar 7
to BBEdit Talk
Wow, what a load of data.

Here is what I get in Terminal app.

```
TMPDIR=/var/folders/tn/w17_9wjn5n92wxtm5r6tlcbc0000gn/T/
__CFBundleIdentifier=com.apple.Terminal
XPC_FLAGS=0x0
TERM=xterm-256color
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.DxVzQnvk7o/Listeners
XPC_SERVICE_NAME=0
TERM_PROGRAM=Apple_Terminal
COLORTERM=truecolor
OSLogRateLimit=64
TERM_PROGRAM_VERSION=466
TERM_SESSION_ID=5484886C-4030-47D4-9BD2-1D34A46CD334
SHELL=/bin/zsh
HOME=/Users/greg
LOGNAME=greg
USER=greg
PATH=/Applications/ServBay/script/alias:/Applications/ServBay/bin:/Applications/ServBay/sbin:/Applications/ServBay/script:/Applications/ServBay/package/python/current/Python.framework/Versions/Current/bin:/Applications/ServBay/package/node/current/bin:/Applications/ServBay/package/ruby/current/bin:/Users/greg/Library/pnpm:/usr/local/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pmk/env/global/bin:/usr/local/share/dotnet
SHLVL=1
PWD=/Users/greg
OLDPWD=/Users/greg
EDITOR=/usr/local/bin/bbedit -w --resume
PNPM_HOME=/Users/greg/Library/pnpm
LANG=en_US.UTF-8
_=/usr/bin/env
```

Here is what I get from a generic shell Worksheet:

```
COMMAND_MODE=unix2003
PATH=/Users/greg/Library/pnpm:/Applications/ServBay/script/alias:/Applications/ServBay/bin:/Applications/ServBay/sbin:/Applications/ServBay/script:/Applications/ServBay/package/python/current/Python.framework/Versions/Current/bin:/Applications/ServBay/package/node/current/bin:/Applications/ServBay/package/ruby/current/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pmk/env/global/bin:/usr/local/share/dotnet
TMPDIR=/Users/greg/Library/Containers/com.barebones.bbedit/Data/tmp/
__CFBundleIdentifier=com.barebones.bbedit
LOGNAME=greg
HOME=/Users/greg
XPC_FLAGS=0x0
SUDO_ASKPASS=/Applications/BBEdit.app/Contents/XPCServices/BBShellWorksheetXPCService.xpc/Contents/MacOS/sudoaskpass-helper
SSH_ASKPASS=/Applications/BBEdit.app/Contents/XPCServices/BBShellWorksheetXPCService.xpc/Contents/MacOS/sshaskpass-helper
DISPLAY=0
BBEDIT_PID=27998
USER=greg
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.DxVzQnvk7o/Listeners
XPC_SERVICE_NAME=0
BBEDIT_CLIENT_UUID=6A7086AD-90DD-47C3-A9BE-DA4B0438223D
SHELL=/bin/zsh
OSLogRateLimit=64
BBEDIT_CLIENT_INTERACTIVE=1
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
SHLVL=1
PWD=/Users/greg/Documents/Website-xtras
OLDPWD=/
LANG=C.UTF-8
PNPM_HOME=/Users/greg/Library/pnpm
_=/usr/bin/env
```

I hope this means more to you than it does to me.

GR

jj

unread,
Mar 8, 2026, 6:12:09 AMMar 8
to BBEdit Talk
Hi Greg,

I should have mentioned it is better to avoid publishing `env` output in case it leaks private environment variables.

Comparing the PATH variables between Worksheet and Terminal, you can see that node is loaded from the /Users/greg/Library/pnpm in the Terminal and loaded from /Applications/ServBay/package/node/current/bin in the Worksheet.

Screenshot 2026-03-08 at 11.04.26.png

Order matters in the PATH. Paths are searched left to right. 

In the ~/.zprofile file try to put /Users/greg/Library/pnpm at the beginning of the PATH so the Worksheet finds this version of node first.

HTH,

Jean Jourdain

Greg Raven

unread,
Mar 8, 2026, 5:15:17 PMMar 8
to BBEdit Talk
Jean,

That seems to work for js-beautify, but then I get the other error message about node not being found.

/Users/greg/Library/pnpm/js-beautify: line 20: exec: node: not found

GR

Greg Raven

unread,
Mar 8, 2026, 5:17:49 PMMar 8
to BBEdit Talk
Jean,

Node seems to be located here:

/Applications/ServBay/script/alias/node

I did the path redirect with this code:


```

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


# pnpm
export PNPM_HOME="/Users/greg/Library/pnpm"
case ":$PATH:" in
  *":$PNPM_HOME:"*) ;;
  *) export PATH="$PNPM_HOME:$PATH" ;;
esac
# pnpm end

```


On Sunday, March 8, 2026 at 3:12:09 AM UTC-7 jj wrote:

GP

unread,
Mar 9, 2026, 5:51:39 AMMar 9
to BBEdit Talk
Do a Get Info on "/Applications/ServBay/script/alias/node" and you'll see it is just an alias to "/Applications/ServBay/script/alias/servbay-node". servbay-node is a shell script which "provides project-level Node.js version management."

The script determines which node version to use to execute the node command; determines where that specific executable is located; sets/resets the appropriate environment variables (e.g., $PATH); and, if no errors, exec's the specific executable.

The script has seven "determination" stages to set the specific executable to use for node. For the node case, the stages are from the project and general Servbay config file settings, possible NVM installation info, possible Homebrew installation, and finally a /usr/local/bin or /usr/bin installation.

If you look in the "/Applications/ServBay/script/alias/" directory, you'll find there's a similar alias file to servbay-XX script files for the other packages/tools that ServBay can configuration manage.

Modifying the $PATH in the .zprofile so that a package/tool can be found with a BBEdit worksheet non-interactive shell session defeats ServBay's configuration management scheme - the reason why you switched to trying to use ServBay to manage your development configurations.

That said, I haven't figured out (yet) why that sort of dynamic specific version selection and exec dispatch works for a zsh interactive shell invocation but not for a BBEdit worksheet zsh non-interactive shell invocation.
Reply all
Reply to author
Forward
0 new messages