Ipfs was not found after installation on macOS Catalina

nodejs-mobile-react-native was installed on a macOS Catalina for React Native 0.61.5/Xcode 11.2/Xcode command line tools for 11.2. Also did yarn add nodejs-gyp. Node version 10.15.0
ipfs was installed by:

yarn add ipfs

After installation, in package.json there is an entry

“dependencies”: {
“ipfs”: “^0.40.0”

When type ipfs --version and got the error:

-bash: ipfs: command not found

What is missing with the ipfs installation?

NPM won’t install ipfs into your path, it’ll just make it available to scripts invoked by npm.

The main command should be installed under node_modules/.bin. Alternatively, you can install it globally with npm install -g ipfs.