title: Failed to rebuild dependencies with npm
body: <p>As I am trying to push my nodejs app which is working fine locally to heroku, here is what I get in terminal:</p>
  
  <pre><code>dcaclab@ubuntu:~/RubymineProjects/nodejs_consumer$ git push heroku master
  Counting objects: 1417, done.
  Compressing objects: 100% (1195/1195), done.
  Writing objects: 100% (1417/1417), 2.02 MiB | 22 KiB/s, done.
  Total 1417 (delta 247), reused 0 (delta 0)
  
  -----&gt; Node.js app detected
  -----&gt; Resolving engine versions
         Using Node.js version: 0.10.6
         Using npm version: 1.2.21
  -----&gt; Fetching Node.js binaries
  -----&gt; Vendoring node into slug
  -----&gt; Installing dependencies with npm
         npm WARN package.json node-example@0.0.1 No repository field.
         npm WARN package.json node-example@0.0.1 No readme data.
         npm WARN package.json node@0.0.0 No repository field.
         npm WARN package.json faye-websocket@0.4.0 No repository field.
         npm WARN package.json faye-websocket@0.4.0 'repositories' (plural) Not supported.
         npm WARN package.json Please pick one as the 'repository' field
         npm WARN package.json rbytes@0.0.2 No repository field.
         npm WARN package.json node-example@0.0.1 No repository field.
         npm WARN package.json node-example@0.0.1 No readme data.
         npm WARN package.json node@0.0.0 No repository field.
         npm WARN package.json faye-websocket@0.4.0 No repository field.
         npm WARN package.json faye-websocket@0.4.0 'repositories' (plural) Not supported.
         npm WARN package.json Please pick one as the 'repository' field
         npm WARN package.json rbytes@0.0.2 No repository field.
  
         &gt; weak@0.2.2 install /tmp/build_f86ikz343m5u/node_modules/dnode/node_modules/weak
         &gt; node-gyp rebuild
  
         gyp http GET http://nodejs.org/dist/v0.10.6/node-v0.10.6.tar.gz
         gyp http 200 http://nodejs.org/dist/v0.10.6/node-v0.10.6.tar.gz
         make: Entering directory `/tmp/build_f86ikz343m5u/node_modules/dnode/node_modules/weak/build'
           CXX(target) Release/obj.target/weakref/src/weakref.o
           SOLINK_MODULE(target) Release/obj.target/weakref.node
           SOLINK_MODULE(target) Release/obj.target/weakref.node: Finished
           COPY Release/weakref.node
         make: Leaving directory `/tmp/build_f86ikz343m5u/node_modules/dnode/node_modules/weak/build'
  
         &gt; rbytes@0.0.2 install /tmp/build_f86ikz343m5u/node_modules/shoe/node_modules/sockjs/node_modules/rbytes
         &gt; node-waf configure build
  
         sh: node-waf: not found
         npm ERR! weird error 127
         npm ERR! not ok code 0
   !     Failed to rebuild dependencies with npm
   !     Heroku push rejected, failed to compile Node.js app
  
  To git@heroku.com:dcaclab-simulator.git
   ! [remote rejected] master -&gt; master (pre-receive hook declined)
  error: failed to push some refs to 'git@heroku.com:dcaclab-simulator.git'
  </code></pre>
  
  <p>here is my package.json file:</p>
  
  <pre><code>{
    "name": "node-example",
    "version": "0.0.1",
    "dependencies": {
      "dnode": "1.0.5",
      "shoe": "0.0.10"
    },
    "engines": {
      "node": "0.10.x",
      "npm": "1.2.x"
    }
  }
  </code></pre>
  
  <p>Any idea please?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Tried to use node 0.8, here is what I got:</p>
  
  <pre><code>dcaclab@ubuntu:~/RubymineProjects/nodejs_consumer$ git push heroku master
  Counting objects: 1420, done.
  Compressing objects: 100% (1198/1198), done.
  Writing objects: 100% (1420/1420), 2.02 MiB | 24 KiB/s, done.
  Total 1420 (delta 249), reused 0 (delta 0)
  
  -----&gt; Node.js app detected
  -----&gt; Resolving engine versions
         Using Node.js version: 0.8.23
         Using npm version: 1.2.21
  -----&gt; Fetching Node.js binaries
  -----&gt; Vendoring node into slug
  -----&gt; Installing dependencies with npm
         npm WARN package.json node-example@0.0.1 No repository field.
         npm WARN package.json node-example@0.0.1 No readme data.
         npm WARN package.json node@0.0.0 No repository field.
         npm WARN package.json rbytes@0.0.2 No repository field.
         npm WARN package.json faye-websocket@0.4.0 No repository field.
         npm WARN package.json faye-websocket@0.4.0 'repositories' (plural) Not supported.
         npm WARN package.json Please pick one as the 'repository' field
         npm WARN package.json node-example@0.0.1 No repository field.
         npm WARN package.json node-example@0.0.1 No readme data.
         npm WARN package.json node@0.0.0 No repository field.
         npm WARN package.json rbytes@0.0.2 No repository field.
         npm WARN package.json faye-websocket@0.4.0 No repository field.
         npm WARN package.json faye-websocket@0.4.0 'repositories' (plural) Not supported.
         npm WARN package.json Please pick one as the 'repository' field
  
         &gt; weak@0.2.2 install /tmp/build_1uw8vrtz5u7yu/node_modules/dnode/node_modules/weak
         &gt; node-gyp rebuild
  
         gyp http GET http://nodejs.org/dist/v0.8.23/node-v0.8.23.tar.gz
         gyp http 200 http://nodejs.org/dist/v0.8.23/node-v0.8.23.tar.gz
         make: Entering directory `/tmp/build_1uw8vrtz5u7yu/node_modules/dnode/node_modules/weak/build'
           CXX(target) Release/obj.target/weakref/src/weakref.o
           SOLINK_MODULE(target) Release/obj.target/weakref.node
           SOLINK_MODULE(target) Release/obj.target/weakref.node: Finished
           COPY Release/weakref.node
         make: Leaving directory `/tmp/build_1uw8vrtz5u7yu/node_modules/dnode/node_modules/weak/build'
  
         &gt; rbytes@0.0.2 install /tmp/build_1uw8vrtz5u7yu/node_modules/shoe/node_modules/sockjs/node_modules/rbytes
         &gt; node-waf configure build
  
         Checking for program g++ or c++          : /usr/bin/g++ 
         Checking for program cpp                 : /usr/bin/cpp 
         Checking for program ar                  : /usr/bin/ar 
         Checking for program ranlib              : /usr/bin/ranlib 
         Checking for g++                         : ok  
         Checking for node path                   : not found 
         Checking for node prefix                 : ok /tmp/node-node-Rkll 
         'configure' finished successfully (0.027s)
         Waf: Entering directory `/home/dcaclab/RubymineProjects/nodejs_consumer/node_modules/shoe/node_modules/sockjs/node_modules/rbytes/build'
         Waf: Leaving directory `/home/dcaclab/RubymineProjects/nodejs_consumer/node_modules/shoe/node_modules/sockjs/node_modules/rbytes/build'
         Traceback (most recent call last):
           File "/tmp/node-node-Rkll/bin/node-waf", line 16, in &lt;module&gt;
             Scripting.prepare(t, os.getcwd(), VERSION, wafdir)
           File "/tmp/node-node-Rkll/bin/../lib/node/wafadmin/Scripting.py", line 145, in prepare
             prepare_impl(t, cwd, ver, wafdir)
           File "/tmp/node-node-Rkll/bin/../lib/node/wafadmin/Scripting.py", line 135, in prepare_impl
             main()
           File "/tmp/node-node-Rkll/bin/../lib/node/wafadmin/Scripting.py", line 188, in main
             fun(ctx)
           File "/tmp/node-node-Rkll/bin/../lib/node/wafadmin/Scripting.py", line 386, in build
             return build_impl(bld)
           File "/tmp/node-node-Rkll/bin/../lib/node/wafadmin/Scripting.py", line 405, in build_impl
             bld.compile()
           File "/tmp/node-node-Rkll/bin/../lib/node/wafadmin/Build.py", line 268, in compile
             os.chdir(self.bldnode.abspath())
         OSError: [Errno 2] No such file or directory: '/home/dcaclab/RubymineProjects/nodejs_consumer/node_modules/shoe/node_modules/sockjs/node_modules/rbytes/build'
         npm ERR! weird error 1
         npm ERR! not ok code 0
   !     Failed to rebuild dependencies with npm
   !     Heroku push rejected, failed to compile Node.js app
  
  To git@heroku.com:dcaclab-simulator.git
   ! [remote rejected] master -&gt; master (pre-receive hook declined)
  error: failed to push some refs to 'git@heroku.com:dcaclab-simulator.git'
  </code></pre>