TooTallNate / node-speaker

Output PCM audio data to the speakers
648 stars 145 forks source link

failed install on the macosx #83

Closed chinaguo closed 4 years ago

chinaguo commented 8 years ago

child_process: customFds option is deprecated, use stdio instead. CC(target) Release/obj.target/output/deps/mpg123/src/output/coreaudio.o LIBTOOL-STATIC Release/liboutput.a libtool: unrecognized option -static' libtool: Trylibtool --help' for more information. make: *\ [Release/liboutput.a] Error 1 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/Users/guoxinchun1/.nvm/versions/node/v0.12.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12) gyp ERR! System Darwin 15.4.0 gyp ERR! command "node" "/Users/guoxinchun1/.nvm/versions/node/v0.12.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/guoxinchun1/project/nodejs/electron/electron-quick-speeker/node_modules/speaker gyp ERR! node -v v0.12.0 gyp ERR! node-gyp -v v1.0.2 gyp ERR! not ok npm ERR! Darwin 15.4.0 npm ERR! argv "/Users/guoxinchun1/.nvm/versions/node/v0.12.0/bin/node" "/Users/guoxinchun1/.nvm/versions/node/v0.12.0/bin/npm" "install" npm ERR! node v0.12.0 npm ERR! npm v2.5.1 npm ERR! code ELIFECYCLE

npm ERR! speaker@0.3.0 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the speaker@0.3.0 install script 'node-gyp rebuild'. npm ERR! This is most likely a problem with the speaker 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 their info via: npm ERR! npm owner ls speaker npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/guoxinchun1/project/nodejs/electron/electron-quick-speeker/npm-debug.log

timothymugayi commented 4 years ago

There seems to be a problem with node v12.x.x at least on a mac. The solution that seems to work for me is performing a downgrade from node@12.x.x to 1.10.0. Best to use nvm so you can switch between node versions easily.

$ nvm install 11.10.0`
$ npm install speaker --mpg123-backend=openal  --save
Jacobus1998 commented 2 years ago

Hello, I was hoping to receive some help on this issue as well.

I am using ubuntu as an OS and I tried the above mentioned commands to use nvm v11.10.0 and ran the command again to install the package: npm install speaker --mpg123-backend=openal --save

But I am still receiving the same error:

speaker@0.5.3 install /home/pi/node_modules/speaker node-gyp rebuild

gyp: name 'mpg123_cpu' is not defined while evaluating condition 'mpg123_cpu=="arm_nofpu"' in deps/mpg123/mpg123.gyp while loading dependencies of binding.gyp while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/home/pi/.nvm/versions/node/v11.10.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16) gyp ERR! stack at ChildProcess.emit (events.js:197:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12) gyp ERR! System Linux 4.9.140-tegra gyp ERR! command "/home/pi/.nvm/versions/node/v11.10.0/bin/node" "/home/pi/.nvm/versions/node/v11.10.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/pi/node_modules/speaker gyp ERR! node -v v11.10.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN ws@7.4.0 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself. npm WARN ws@7.4.0 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself. npm WARN pi@1.0.0 No description npm WARN pi@1.0.0 No repository field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! speaker@0.5.3 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the speaker@0.5.3 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/2021-10-13T09_01_44_411Z-debug.log

Any help will be greatly appreciated. Thank you

patrykk21 commented 1 year ago

I'm still having the above issue

KamKaminski commented 1 year ago

Was anyone able to resolve this issue/error?

saikatmitra91 commented 10 months ago

Am also facing the issue. And the issue is marked closed :)

ATSiem commented 10 months ago

I can't get speaker to install on the latest MacOS with all relevant updates.

There's an issue when node-gyp tries to rebuild the speaker package, specifically a configuration issue in binding.gyp or mpg123.gyp. The 'mpg123_cpu is not defined'.

I tried myriad Node 14-latest/Python 2.7-3.8-latest versions...

2023-11-17T20_22_25_854Z-debug-0.log


╰─ npm install speaker npm ERR! code 1 npm ERR! path /Users/USERNAME/node_modules/speaker npm ERR! command failed npm ERR! command sh -c node-gyp rebuild npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.4.0 npm ERR! gyp info using node@20.9.0 | darwin | arm64 npm ERR! gyp info find Python using Python version 3.9.6 found at "/Library/Developer/CommandLineTools/usr/bin/python3" npm ERR! gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/Users/adamsiem/.nvm/versions/node/v20.9.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/USERNAME/node_modules/speaker/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/USERNAME/.nvm/versions/node/v20.9.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/Users/USERNAME/Library/Caches/node-gyp/20.9.0/include/node/common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/USERNAME/Library/Caches/node-gyp/20.9.0', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/USERNAME/.nvm/versions/node/v20.9.0/lib/node_modules/npm/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/USERNAME/Library/Caches/node-gyp/20.9.0/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/USERNAME/node_modules/speaker', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp: name 'mpg123_cpu' is not defined while evaluating condition 'mpg123_cpu=="arm_nofpu"' in deps/mpg123/mpg123.gyp while loading dependencies of binding.gyp while trying to load binding.gyp npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: gyp failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/Users/USERNAME/.nvm/versions/node/v20.9.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:325:16) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:514:28) npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12) npm ERR! gyp ERR! System Darwin 23.1.0 npm ERR! gyp ERR! command "/Users/USERNAME/.nvm/versions/node/v20.9.0/bin/node" "/Users/adamsiem/.nvm/versions/node/v20.9.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd /Users/USERNAME/node_modules/speaker npm ERR! gyp ERR! node -v v20.9.0 npm ERR! gyp ERR! node-gyp -v v9.4.0 npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /Users/USERNAME/.npm/_logs/2023-11-17T20_22_25_854Z-debug-0.log

kamalkech commented 9 months ago

This is very old issue and still not fixed !!! Get same error here !

nilsroemer commented 9 months ago

Same

Sengulair commented 9 months ago

Same

phin commented 7 months ago

Same error, repro steps and workarounds tried above, Jan 28th 2024 :)

msshang18 commented 5 months ago

same error

GatoVuelta commented 2 months ago

Same issue here. Node v20 (Tried also with v18, v16, v11 with no luck)