npm ERR! gyp ERR! stack Error: Command failed: /usr/bin/python3

As far as I'm aware, Joplin actually requires specifically Python 2 to build (or for me it has anyway).

For my builds, setting Python 3 modules via $PYTHONPATH broke it, and my build packages specifically mentions Python 2, so I assume past me had reasons for it.