Permission issue, terminal integration after Node 20 upgrade

I upgrade from Node 18.11 to 20. I can start my dev server fine, but when I ask in Cursor chat to run the dev server, it gets into permission issues no matter what it does.

:laptop: macOS 15.4.1 Cursor 0.51.1

Terminal output:

henrikvendelbo@Mr-Purple /V/P/T/thepia.com (feat/auth0)> pnpm run dev:443(base)
ERROR: This version of pnpm requires at least Node.js v18.12
The current version of Node.js is v18.11.0
Visit Installation | pnpm to see the list of past pnpm versions with respective Node.js version support.
error: Unable to open universal variable file ‘/’: Permission denied
error: Unable to open universal variable file ‘/’: Permission denied
error: Unable to open universal variable file ‘/’: Permission denied
error: Unable to open universal variable file ‘/’: Permission denied
error: Unable to open universal variable file ‘/’: Permission denied
error: Unable to open universal variable file ‘/’: Permission denied
error: Unable to open universal variable file ‘/’: Permission denied
error: Unable to open universal variable file ‘/’: Permission denied
error: Unable to open universal variable file ‘/’: Permission denied
error: Unable to open universal variable file ‘/’: Permission denied
error: Unable to open universal variable file ‘/’: Permission denied
error: Unable to open universal variable file ‘/’: Permission denied
error: Unable to open universal variable file ‘/’: Permission denied
error: Unable to open universal variable file ‘/’: Permission denied
error: Unable to open universal variable file ‘/’: Permission denied
error: Unable to open universal variable file ‘/’: Permission denied
error: Unable to open universal variable file ‘/’: Permission denied
error: Unable to open universal variable file ‘/’: Permission denied
error: Unable to open universal variable file ‘/’: Permission denied
error: Unable to open universal variable file ‘/’: Permission denied

Something similar

henrikvendelbo@Mr-Purple /V/P/T/thepia.com (feat/auth0)> which -a node (base)
/usr/local/bin/node
error: Unable to open universal variable file ‘/’: Permission denied
error: Unable to open universal variable file ‘/’: Permission denied
error: Unable to open universal variable file ‘/’: Permission denied
error: Unable to open universal variable file ‘/’: Permission denied

It seems the fish shell install was corrupted. I guess Cursor defaults to using fish over zsh for macOS. Since I otherwise use zsh, I was expecting it to be used by Cursor as well. I installed fish with home-brew and it now seems to work