Installing Node and NPM on your Mac build machine

As you implement your Mobile DevOps pipeline, eventually you will come to the point when you need to distribute your application to testers. That is where HockeyApp comes in.  HockeyApp not only lets you distribute your application to testers, but you can also collect crash and usage data.

Visual Studio Team Services has a HockeyApp extension that makes integrating HockeyApp very easy. One requirement of the HockeyApp tasks added by the extension is NPM.  In the previous post Mac setup for Mobile DevOps with Visual Studio Team Services, we created a Mac build machine we could use for CI for our iOS projects. However, Macs do not have NPM installed by default.  Picking up where we left off, we are going to add Node and NPM to our build machine.  You’ll remember that we installed Homebrew to make installing the OpenSSL update easier.  Well Homebrew is also the easiest way to install Node and NPM as well.

  1. Press Command (⌘) - Space
  2. Type Terminal
  3. Press Enter
  4. Enter the following command:
    brew install node
  5. Press Enter

With Node and NPM installed, we need to restart our agent so it can register its new capabilities with Visual Studio Team Services.  In the previous post, we installed the agent in a A1 folder under your Documents folder. If you installed your agent to a different location, adjust the commands below.

  1. Press Command (⌘) - Space
  2. Type Terminal
  3. Press Enter
  4. Enter the following command:
    cd ~/Documents/A1
  5. Press Enter
  6. Enter the following command:
    sudo ./svc.sh stop
  7. Press Enter
    You may be prompted for your password.
  8. Enter the following command:
    sudo ./svc.sh start
  9. Press Enter

Now you can visit Visual Studio Team Services to see the new capabilities of your agent.

image

Add comment

Loading