npm install unsupported url type

npm install returns an “Unsupported URL Type” error

While working on an Ember.js app today, I hit an odd snag.  Running a standard npm install was bombing terribly on my Mac.  And 10 minutes of my google-fu wasn’t turning up any good leads.  I had searched for “npm install ERR! Unsupported URL Type“, upon other variants, but I had missed something.

# Standard npm install command on Mac
$ npm install

npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.4.3
npm ERR! npm  v2.15.1

npm ERR! Unsupported URL Type: github:mike-north/ember-cli-sass#8ceb57d41f5774e8ececb5d1f05454449c19000c
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <>

The Solution

What I had missed was a woefully out of date npm version.  Node.js was already at latest (4.4.3 at the time of this post), but I remember screwing around with re-installing npm on this machine the other day and somehow I was running npm v2.15.1.

# Using sudo may be optional, depending on your platform and permissions.
sudo npm install [email protected] -g

Updating to the latest version of npm fixed the errors I encountered with npm install.  And I’m sure there’s another lesson in there somewhere about nuking at reinstalling core software tools, but maybe that will be detailed in a future post.

TLDR; — I won’t be detailing that in a future post.