vincentsaluzzo / node-microphone

microphone is a simple module that use `arecord` ALSA tools method to capture sound from a USB Microphone
56 stars 48 forks source link

node-gyp rebuild error when installing on Node v6.2.2 #15

Open bretcj7 opened 8 years ago

bretcj7 commented 8 years ago

Tried installing on node 5.0 and had issues so upgraded to node 6.2.2 and still having issues installing the npm package.

lame@1.0.3 install /Users/Bret 1/node_modules/lame node-gyp rebuild

deps/mpg123/test.target.mk:156: warning: overriding commands for target Release/test' deps/lame/test.target.mk:164: warning: ignoring old commands for targetRelease/test' CC(target) Release/obj.target/mp3lame/deps/lame/libmp3lame/VbrTag.o clang: error: no such file or directory: '1/.node-gyp/6.2.2/include/node' clang: error: no such file or directory: '1/.node-gyp/6.2.2/src' clang: error: no such file or directory: '1/.node-gyp/6.2.2/deps/uv/include' clang: error: no such file or directory: '1/.node-gyp/6.2.2/deps/v8/include' make: *\ [Release/obj.target/mp3lame/deps/lame/libmp3lame/VbrTag.o] Error 1 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12) gyp ERR! System Darwin 15.5.0 gyp ERR! command "/usr/local/Cellar/node/6.2.2/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/Bret 1/node_modules/lame gyp ERR! node -v v6.2.2 gyp ERR! node-gyp -v v3.3.1 gyp ERR! not ok npm WARN enoent ENOENT: no such file or directory, open '/Users/Bret 1/package.json' npm WARN Bret 1 No description npm WARN Bret 1 No repository field. npm WARN Bret 1 No README data npm WARN Bret 1 No license field. npm ERR! Darwin 15.5.0 npm ERR! argv "/usr/local/Cellar/node/6.2.2/bin/node" "/usr/local/bin/npm" "install" "microphone" npm ERR! node v6.2.2 npm ERR! npm v3.9.5 npm ERR! code ELIFECYCLE

npm ERR! lame@1.0.3 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the lame@1.0.3 install script 'node-gyp rebuild'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the lame package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs lame npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls lame npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/Bret 1/chart_2d/npm-debug.log

atoftegaard commented 7 years ago

I get the same error when trying to install on node v4.4.7 npm v2.15.8

tiny-tinker commented 7 years ago

I got the same error with the following:

pi@alphared-agent-virtual:~/Tinkering/stt$ node --version
v6.2.2
pi@alphared-agent-virtual:~/Tinkering/stt$ npm --version
3.10.3
pi@alphared-agent-virtual:~/Tinkering/stt$

Any ideas?

tiny-tinker commented 7 years ago

Actually, I was able to get around this by using lame@1.2.4 in package.json... I cloned the repo and did npm install, which gave the error. Then I updated the lame version in package.json to 1.2.4 and did npm install again which worked. Now I'm not exactly sure what to do, but I'm sure it's in here somewhere.

tiny-tinker commented 7 years ago

Yea, so this worked for me:

cd myproject/node_modules
git clone https://github.com/vincentsaluzzo/node-microphone.git
mv node-microphone microphone

Edit package.json to reflect latest lame:

  "dependencies": {
    "lame": "1.2.4"
  },

Then

npm install
aymericbeaumet commented 7 years ago

FYI I put @nomadic-squirrel's fix in this fork:

npm i -S aymericbeaumet/node-microphone
zoutepopcorn commented 7 years ago

nomadic-squirrel did the trick also edit : var mic = require('./microphone');

danhab99 commented 5 years ago

Current year, getting the same error