Monday, March 24, 2014

Installing Titanium CLI 3.2.x Problems? Stuck on 3.1.2 GA?

I'm truly amazed at how much fantastic work that the Appcelerator team has been doing with Titanium and Alloy. That said, I wanted to share a little story of mine with having to try to upgrade to the latest version of the Titanium CLI.

One day, I was wanting to upgrade an existing mobile project and I wanted to make use of the new features like the Pull To Refresh widget that landed in Titanium v3.2.x. I thought it looked amazing as soon as I saw it. So, the first thing I did was "sudo npm install -g titanium@3.2.2". Everything looked great! Until...

> titanium -v

Oh man. That didn't work. The tricky thing here is that they have an SDK version, a CLI version, as well as, a Studio version. One thing to note is that it's easy to install the SDK and CLI from Titanium Studio but I figure since they've made the CLI, they're wanting developers to move away from large IDEs and use text editors like Atom, Sublime Text, TextMate or even Vim or Emacs.

The eventual fix that I ended up going with is just removing "/usr/local/share/npm/bin/" from my PATH. This ensured that when you're invoking "titanium" or "ti", you're using the correct one from npm. Good times! Keep calm and mobile on!
Post a Comment