Node package manager failing on heroku deployment

Sorry if this has been answered, but I can't see anyone getting exactly this error.

Using foreman, I can see that my app sucessfully runs, but upon deploying to Heroku, I'm getting the following error:

Counting objects: 717, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (617/617), done.
Writing objects: 100% (717/717), 3.22 MiB | 305 KiB/s, done.
Total 717 (delta 61), reused 0 (delta 0)
-----> Node.js app detected
-----> Resolving engine versions
   Using Node.js version: 0.6.20
   Using npm version: 1.0.106
-----> Fetching Node.js binaries
-----> Vendoring node into slug
-----> Installing dependencies with npm
   express@3.0.6 ./node_modules/express
   â"oâ"?â"? range-parser@0.0.4
   â"oâ"?â"? cookie-signature@0.0.1
   â"oâ"?â"? fresh@0.1.0
   â"oâ"?â"? methods@0.0.1
   â"oâ"?â"? mkdirp@0.3.3
   â"oâ"?â"? cookie@0.0.5
   â"oâ"?â"? debug@0.7.0
   â"oâ"?â"? buffer-crc32@0.1.1
   â"oâ"?â"? commander@0.6.1
   â"oâ"?â"? send@0.1.0 (mime@1.2.6)
   â""â"?â"? connect@2.7.2
   npm ERR! Error: ENOENT, chmod '/tmp/build_2phd1ent7ca7q/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/bin/uglifyjs'
   npm ERR! Report this *entire* log at:
   npm ERR!     <http://github.com/isaacs/npm/issues>
   npm ERR! or email it to:
   npm ERR!     <npm-@googlegroups.com>
   npm ERR!
   npm ERR! System Linux 2.6.32-348-ec2
   npm ERR! command "/tmp/node-node-UFfk/bin/node" "/tmp/node-npm-Mvon/cli.js" "rebuild"
   npm ERR! cwd /tmp/build_2phd1ent7ca7q
   npm ERR! node -v v0.6.20
   npm ERR! npm -v 1.0.106
   npm ERR! path /tmp/build_2phd1ent7ca7q/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/bin/uglifyjs
   npm ERR! code ENOENT
   npm ERR!
   npm ERR! Additional logging details can be found in:
   npm ERR!     /tmp/build_2phd1ent7ca7q/npm-debug.log
   npm not ok
 !     Failed to rebuild dependencies with npm
 !     Heroku push rejected, failed to compile Node.js app

I guess it's something to do with socket.io dependencies, but I'm not knowledgable enough to know exactly what. I created a new git repo and copied this over from a different one as the project wasn't in the root of that repository and therefore not able to push to heroku, so maybe that has something to do with it.

Any help would be very much appreciated.

You get that error because one of the dependencies of uglifyjs (source-map to be precise), used by socketio, requires node to be at least >= 0.8, and you're using 0.6.20.

npm info source-map@0.1.7 shows this (some keys removed):

{ name: 'source-map',
  description: 'Generates and consumes source maps',
  'dist-tags': { latest: '0.1.8' },
  versions: 
   [ '0.0.0',
     ...
     '0.1.8' ],
  time: 
   { '0.0.0': '2011-08-30T19:45:40.104Z',
     ...
     '0.1.7': '2012-11-02T19:09:11.172Z',
     '0.1.8': '2012-11-19T22:48:36.067Z' },
  author: 'Nick Fitzgerald <nfitzgerald@mozilla.com>',
  version: '0.1.7',
  homepage: 'https://github.com/mozilla/source-map',
  engines: { node: '>=0.8.0' },
  dist: 
   { shasum: '92da34014a5576d60676150bcf0f55cbd1f395c0',
     tarball: 'http://registry.npmjs.org/source-map/-/source-map-0.1.7.tgz' } }

As you can see from the engines key, it requires at least version 0.8.0 of node.