The page https://joplinapp.org/terminal/ simply says to install nodeJS 10+.
-
Mac Ports (port) does not install npm with a nodejs installation; it is not recommended. (Brew does)
-
Running (per the Joplin docs) "NPM_CONFIG_PREFIX=~/.joplin-bin npm install -g joplin" fails. You need to first do a "mkdir -p $HOME/.joplin-bin/lib" in order for the npm install to succeed. (There may be another way to get the npm install to create the required directories, but I have not investigated).
-
macOS Catalina and Big Sur do not allow writing to /usr/bin, so the symlink creation "sudo ln -s ~/.joplin-bin/bin/joplin /usr/bin/joplin" will not succeed. I recommend simply adding $HOME/.joplin-bin/bin to your $PATH: "echo export PATH='$PATH:$HOME/.joplin-bin/bin' >> ~/.bashrc"