title: NPM/node-gyp error
body: <p>I have tried to install alsa for npm and I run into repeated problems (ref. below). All dependencies have been installed and I am running the latest node.js, NPM and node-gyp versions. Two different fully updated raspbian wheezy systems have been tried out. As I don't have that in-depth knowledge about npm and nodes I was hoping to receive some clues about the underlying problem.</p>
  
  <p>My first idea was that there is a problem with the path files. </p>
  
  <p>Goal-wise I would like to pipe the alsa sound to a streaming server, for that I need to include alsa bindings for npm.</p>
  
  <p><a href="https://www.npmjs.com/package/alsa" rel="nofollow noreferrer">https://www.npmjs.com/package/alsa</a></p>
  
  <p>Any help highly appreciated!</p>
  
  <p>(some log is missing because I can't paste that much in here, but I cut mainly all pcm.h errors which is pretty long. </p>
  
  <pre><code>pi@home-automation:~ $ npm install alsa
  
  &gt; alsa@0.0.2 install /home/pi/node_modules/alsa
  &gt; node-gyp rebuild
  
  make: Entering directory '/home/pi/node_modules/alsa/build'
    CXX(target) Release/obj.target/alsa/alsa.o
  In file included from ../alsa.cc:3:0:
  ../pcm.h:16:31: error: expected class-name before ‘{’ token
   class Pcm : public ObjectWrap {
                                 ^
  ../pcm.h:48:5: error: ‘uv_work_t’ does not name a type
       uv_work_t request;
  
  ########### cutted log here #########
  
      alsa.target.mk:92: recipe for target 'Release/obj.target/alsa/alsa.o' failed
      make: *** [Release/obj.target/alsa/alsa.o] Error 1
      make: Leaving directory '/home/pi/node_modules/alsa/build'
      gyp ERR! build error 
      gyp ERR! stack Error: `make` failed with exit code: 2
      gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
      gyp ERR! stack     at emitTwo (events.js:125:13)
      gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
      gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
      gyp ERR! System Linux 4.9.35-v7+
      gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
      gyp ERR! cwd /home/pi/node_modules/alsa
      gyp ERR! node -v v8.7.0
      gyp ERR! node-gyp -v v3.6.2
      gyp ERR! not ok 
      npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
      npm WARN pi No description
      npm WARN pi No repository field.
      npm WARN pi No README data
      npm WARN pi No license field.
  
      npm ERR! code ELIFECYCLE
      npm ERR! errno 1
      npm ERR! alsa@0.0.2 install: `node-gyp rebuild`
      npm ERR! Exit status 1
      npm ERR! 
      npm ERR! Failed at the alsa@0.0.2 install script.
      npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
      npm ERR! A complete log of this run can be found in:
      npm ERR!     /home/pi/.npm/_logs/2017-10-16T07_04_32_809Z-debug.log
  </code></pre>