spine.js difficlties with jquery dependency

I am trying to give spine.js a spin but I am having difficulties when including jQuery as a dependency. Basically I reference "jquery": "~1.8.3" in package.json and "jquery" in slug.json, then I run npm install .

Fire up hem server, but when I load my app it crashes on me with the following output:

 /usr/local/lib/node_modules/hem/lib/resolve.js:43
      throw "Cannot find module: " + request + ". Have you run `npm install .`
                                             ^
Cannot find module: url. Have you run `npm install .` ?

This seems to be related to node.js url module, and how hem uses node/lib/module.js to resolve/load? dependencies?.

Below you'll find particular code that crashes on hem/lib/resolve.js

module.exports = function(request, parent) {
var dir, filename, id, paths, _, _ref1;
if (parent == null) {
  parent = repl;
}
_ref1 = Module._resolveLookupPaths(request, parent), _ = _ref1[0], paths = _ref1[1];
filename = Module._findPath(request, paths);
dir = filename;
if (!filename) {
  throw "Cannot find module: " + request + ". Have you run `npm install .` ?";
}
while (__indexOf.call(invalidDirs, dir) < 0 && __indexOf.call(modulePaths, dir) < 0) {
  dir = dirname(dir);
}
if (__indexOf.call(invalidDirs, dir) >= 0) {
  throw "Load path not found for " + filename;
}
id = filename.replace("" + dir + "/", '');
return [modulerize(id, filename), filename];

};

The call to Module._findPath(request, paths) returns false being request = "url" and paths= "."

I have tried manually installing node.js url module, using npm both locally and even globally and is still failing in the same way. I have also tried including jquery under lib instead of automatic management but it gives the same results.

NPM is not for frontend development, as far as Spine.js is :) You should install Twitter Bower - https://github.com/twitter/bower. You can do it system-wide (npm install bower -g), or locally {"devDepencies": {"bower": "0.6.6"}} to your package.json and npm install. Then create component.json with depencies for spine and jquery. Run bower install or ./node_modules/.bin/bower install . after. You'll find spine and jquery in components folder.