I am trying to run a bitbucket pipeline runner on my macOS computer in order to build my react native application using fastlane.
Manually I know I have all the deps I need like npm, xcode, etc but when I try to run an npm install or something, I get an error "npm is not a known command", I have also checked the path and the installation directory is not in it.
So my question is how do I use (for example) the npm that is installed on the macos computer my runner runs on in my pipelines.
Thank you.
Hi Tomer and welcome to the community!
MacOS Runners do not use Docker containers, they use Bash to run pipeline steps on your MacOS machine (host device).
If a certain tool is installed on your MacOS and you can use it in Bash outside the runner, you should be able to use it with the runner as well.
You mentioned that the installation directory of npm is not in the $PATH, so it sounds like this may be the reason why the command cannot be found.
I would suggest the following:
Kind regards,
Theodora
Your macOS is a runner which runs bitbucket pipelines which spawn containers for each step.
It sounds like the image the step is using, does not have npm installed or npm is not in its PATH.
To verify it, pull the image locally (to your macOS), run it interactively and try running the command "npm -v".
Hope that helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.