Giter VIP home page Giter VIP logo

node-opus's Introduction

This project has been archived due to lack of maintenance and support for new Node.js versions.

See @discordjs/opus for an alternative based on the more modern N-API technology that is more stable between Node.js versions. More information in @discordjs/discord.js#3678.

node-opus

NodeJS native bindings to libopus

This module implements bindings for Opus v1.1 for Node.js.

var opus = require('node-opus');

// Create the encoder.
// Specify 48kHz sampling rate and 10ms frame size.
// NOTE: The decoder must use the same values when decoding the packets.
var rate = 48000;
var encoder = new opus.OpusEncoder( rate );

// Encode and decode.
var frame_size = rate/100;
var encoded = encoder.encode( buffer, frame_size );
var decoded = encoder.decode( encoded, frame_size );

// or create streams
var channels = 2;
var opusEncodeStream = new opus.Encoder(rate, channels, frame_size);
var opusDecodeStream = new opus.Decoder(rate, channels, frame_size);
// see examples folder for a more complete example

Platform support

Supported platforms:

  • Linux x64 & ia32
  • Linux ARM (Raspberry Pi 1 & 2)
  • Linux ARM64 (Raspberry Pi 3)
  • Mac OS X x64
  • Windows x64

Add new supported platforms by running ./autogen.sh and ./configure in deps/opus and copying the resulting config.h to deps/config/opus/[os]/[arch].

Use the following flags with configure:

./configure --enable-static --disable-shared --with-pic

On a clean debian-based system, the full flow looks approximately like:

sudo apt-get update
sudo apt-get install autoconf
sudo apt-get install libtool
cd deps/opus
./autogen.sh
./configure --enable-static --disable-shared --with-pic
mkdir -p ../config/opus/[os]/[arch]
cp config.h ../config/opus/[os]/[arch]

And, then, the last step is to add the OS/Arch to package.json.

node-opus's People

Contributors

aemino avatar amishshah avatar doomjs avatar fredericgermain avatar mattvperry avatar mrclsu avatar nfriedly avatar nicholastay avatar rantanen avatar rotem925 avatar skiptirengu avatar thijstriemstra avatar valrus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

node-opus's Issues

Support for on-the-fly bitrate changes?

Does this package allow for changing the bitrate in response to network conditions in a streaming application? It's my understanding that Opus can seamlessly change the encoded bitrate which makes it ideal for a streaming solution where the network conditions may vary. A fullband stream could fall back to narrowband if the connection is poor, for example.

Does Opus handle this natively, or do you need to detect this condition yourself and tell Opus to alter the bitrate accordingly? And can this package do this or is it too simplistic of an implementation right now?

Any info to point me in the right direction would be helpful.

installation failed

C:\Users\Thaem\Desktop\Coding projects\lagooner>npm install node-opus

[email protected] install C:\Users\Thaem\Desktop\Coding projects\lagooner\node_modules\ref
node-gyp rebuild

C:\Users\Thaem\Desktop\Coding projects\lagooner\node_modules\ref>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! build error
gyp ERR! stack Error: Command failed: reg query "HKLM\Software\Microsoft\MSBuild\ToolsVersions" /s /reg:32
gyp ERR! stack 'reg' is not recognized as an internal or external command,
gyp ERR! stack operable program or batch file.
gyp ERR! stack
gyp ERR! stack Can't find "msbuild.exe". Do you have Microsoft Visual Studio C++ 2008+ installed?
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:134:25
gyp ERR! stack at ChildProcess.exithandler (child_process.js:218:5)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:192:7)
gyp ERR! stack at maybeClose (internal/child_process.js:890:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Thaem\Desktop\Coding projects\lagooner\node_modules\ref
gyp ERR! node -v v7.5.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
npm WARN [email protected] requires a peer of erlpack@hammerandchisel/erlpack#master but none was installed.
npm WARN [email protected] requires a peer of opusscript@^0.0.1 but none was installed.
npm WARN [email protected] requires a peer of uws@^0.12.0 but none was installed.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "node-opus"
npm ERR! node v7.5.0
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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 ref 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 ref
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ref
npm ERR! There is likely additional logging output above.

Unable to install on macOS

The installation fails with:

Traceback (most recent call last):
  File "./gyp-mac-tool", line 611, in <module>
    sys.exit(main(sys.argv[1:]))
  File "./gyp-mac-tool", line 28, in main
    exit_code = executor.Dispatch(args)
  File "./gyp-mac-tool", line 43, in Dispatch
    return getattr(self, method)(*args[1:])
  File "./gyp-mac-tool", line 246, in ExecFilterLibtool
    if not libtool_re.match(line) and not libtool_re5.match(line):
TypeError: cannot use a string pattern on a bytes-like object
make: *** [Release/opus.a] Error 1

Full output log: https://pastebin.com/DAjLmR0t

Relevant versions:
macOS High Sierra
node.js v9.6.1
npm v5.6.0
node-gyp v3.6.2

Am I doing something wrong?

Unable to install.

[email protected] install C:\Users\ipadpuppydogdude1\Desktop\tone\node_modules\ref
node-gyp rebuild

C:\Users\ipadpuppydogdude1\Desktop\tone\node_modules\ref>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\ipadpuppydogdude1\Desktop\tone\node_modules\ref
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

[email protected] install C:\Users\ipadpuppydogdude1\Desktop\tone\node_modules\node-opus
node-gyp rebuild

C:\Users\ipadpuppydogdude1\Desktop\tone\node_modules\node-opus>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\ipadpuppydogdude1\Desktop\tone\node_modules\node-opus
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\ipadpuppydogdude1\Desktop\tone\package.json'
npm WARN [email protected] requires a peer of bufferutil@^3.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of libsodium-wrappers@^0.7.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of uws@^9.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN tone No description
npm WARN tone No repository field.
npm WARN tone No README data
npm WARN tone No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\ref):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! C:\Users\ipadpuppydogdude1\AppData\Roaming\npm-cache_logs\2018-08-26T19_56_03_561Z-debug.log

packet.packet is undefined

I'm trying this out on a raspberry pi 2 now, and it installed fine, but piping a opus file into it immediately errors with

/home/pi/mic/node_modules/node-opus/lib/Decoder.js:49
    var signature = header.slice( 0, 8 );
                          ^
TypeError: Cannot read property 'slice' of undefined
    at Decoder._parseHeader (/home/pi/mic/node_modules/node-opus/lib/Decoder.js:49:24)
    at Decoder._transform (/home/pi/mic/node_modules/node-opus/lib/Decoder.js:33:8)
    at Transform._read (_stream_transform.js:179:10)
    at Transform._write (_stream_transform.js:167:12)
    at doWrite (_stream_writable.js:301:12)
    at writeOrBuffer (_stream_writable.js:288:5)
    at Writable.write (_stream_writable.js:217:11)
    at ReadStream.ondata (_stream_readable.js:540:20)
    at ReadStream.emit (events.js:107:17)
    at readableAddChunk (_stream_readable.js:163:16)

The var header = packet.packet; line looked suspicious, so I tried changing it to just var header = packet; but that just got me a different error:

events.js:87
      throw Error('Uncaught, unspecified "error" event.');
            ^
Error: Uncaught, unspecified "error" event.
    at Error (native)
    at emit (events.js:87:13)
    at onerror (_stream_readable.js:556:12)
    at emit (events.js:107:17)
    at Decoder._parseHeader (/home/pi/mic/node_modules/node-opus/lib/Decoder.js:51:15)
    at Decoder._transform (/home/pi/mic/node_modules/node-opus/lib/Decoder.js:33:8)
    at Transform._read (_stream_transform.js:179:10)
    at Transform._write (_stream_transform.js:167:12)
    at doWrite (_stream_writable.js:301:12)
    at writeOrBuffer (_stream_writable.js:288:5)

(I think that's the "bad header" error, but you probably have to wrap it in new Error() to get a more useful output. FWIW, if I look at the first bit of the file as ascii, it looks like Lavf56.18.100encoder=Lavc56.20.100 libopusOggS)

Any thoughts?

Decoding packet by packet from udp broadcast

Hello !,
I'm currently developping a web application in node js,
I'm trying to use this module to decode encoded Opus packet diffused by a wifi broadcast, and read the result through the speakers.

I'm having trouble using the first method displayed on the readme : "var decoded = encoder.decode( encoded, frame_size );".

Received packets can have different size and some of them are crashing the decoder : "OPUS_INVALID_PACKET" .
the few decoded packets when writed in the speaker are messy.

I have no trouble decoding the incoming packets using the Opus librairy on an android app.

Any insight whould be appreciated !
Have a great day!

Installation problems

I'm getting this error when i try to install node-opus:

`E:\Discord Bot>npm install node-opus

[email protected] install E:\Discord Bot\node_modules\ref
node-gyp rebuild

E:\Discord Bot\node_modules\ref>if not defined npm_config_node_gyp (node "E:\Node.js\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (E:\Node.js\node_modules\npm\node_modules\node-gyp\lib\configure.js:449:14)
gyp ERR! stack at E:\Node.js\node_modules\npm\node_modules\node-gyp\lib\configure.js:404:11
gyp ERR! stack at E:\Node.js\node_modules\npm\node_modules\graceful-fs\polyfills.js:264:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "E:\Node.js\node.exe" "E:\Node.js\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd E:\Discord Bot\node_modules\ref
gyp ERR! node -v v6.11.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok

[email protected] install E:\Discord Bot\node_modules\node-opus
node-gyp rebuild

E:\Discord Bot\node_modules\node-opus>if not defined npm_config_node_gyp (node "E:\Node.js\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (E:\Node.js\node_modules\npm\node_modules\node-gyp\lib\configure.js:449:14)
gyp ERR! stack at E:\Node.js\node_modules\npm\node_modules\node-gyp\lib\configure.js:404:11
gyp ERR! stack at E:\Node.js\node_modules\npm\node_modules\graceful-fs\polyfills.js:264:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "E:\Node.js\node.exe" "E:\Node.js\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd E:\Discord Bot\node_modules\node-opus
gyp ERR! node -v v6.11.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN [email protected] requires a peer of bufferutil@^3.0.0 but none was installed.
npm WARN [email protected] requires a peer of erlpack@hammerandchisel/erlpack but none was installed.
npm WARN [email protected] requires a peer of opusscript@^0.0.3 but none was installed.
npm WARN [email protected] requires a peer of sodium@^2.0.1 but none was installed.
npm WARN [email protected] requires a peer of libsodium-wrappers@^0.5.1 but none was installed.
npm WARN [email protected] requires a peer of uws@^0.14.1 but none was installed.
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\ref):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "E:\Node.js\node.exe" "E:\Node.js\node_modules\npm\bin\npm-cli.js" "install" "node-opus"
npm ERR! node v6.11.2
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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 node-opus 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 node-opus
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-opus
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! E:\Discord Bot\npm-debug.log`

I already tried so much things but it just wont work, so thats why im posting here. Thanks for any help.

Receiving segmentation fault while trying to encode raw PCM data at certain frequencies

Receiving segmentation fault while encoding at frequencies not belonging to 8k,16k,24k,48k etc

Fault received for 15k, 17k, 20k

var opusEncoder = new opus.Encoder(20000,1);
fs.readFile('sampleAudio.raw', function (err, buffer) {
    if (err) {
        return console.error(err);
    }
    opusEncoder.write(buffer);
});

PID 2859 received SIGSEGV for address: 0x60
/var/www/apache/speechRecognizer/user/node_modules/segfault-handler/build/Release/segfault-handler.node(+0x1bc8)[0x7febf71e0bc8]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10d10)[0x7febf9e4ad10]
/var/www/apache/speechRecognizer/user/node_modules/node-opus/build/Release/node-opus.node(opus_encode+0x36)[0x7febf780d8e6]
/var/www/apache/speechRecognizer/user/node_modules/node-opus/build/Release/node-opus.node(_ZN11OpusEncoder6EncodeERKN3Nan20FunctionCallbackInfoIN2v85ValueEEE+0x183)[0x7febf7804b43]
/var/www/apache/speechRecognizer/user/node_modules/node-opus/build/Release/node-opus.node(+0x3db5)[0x7febf7803db5]
node(_ZN2v88internal25FunctionCallbackArguments4CallEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEE+0x92)[0x913822]
node[0x93dd01]
node[0x93e1f2]
[0x3555e7c0839b]

TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string/buffer

events.js:193
throw er; // Unhandled 'error' event
^

TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string/buffer
at validChunk (_stream_writable.js:255:10)
at WriteStream.Writable.write (_stream_writable.js:289:21)
at Encoder.ondata (_stream_readable.js:642:20)
at emitOne (events.js:125:13)
at Encoder.emit (events.js:221:7)
at addChunk (_stream_readable.js:265:12)
at readableAddChunk (_stream_readable.js:252:11)
at Encoder.Readable.push (_stream_readable.js:209:10)
at Encoder.Transform.push (_stream_transform.js:146:32)
at Encoder._writeHeader (C:\Users\lostc\Back\projects\mic\node_modules\node-opus\lib\Encoder.js:74:10)

installation issues

Trying to install node-opus but this gives me an error"

> [email protected] install C:\Users\RAP\Desktop\bots\erickbot\node_modules\node-opus
> node-gyp rebuild


C:\Users\RAP\Desktop\bots\erickbot\node_modules\node-opus>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  opus.c
  opus_decoder.c
  opus_encoder.c
  opus_multistream.c
  opus_multistream_encoder.c
  opus_multistream_decoder.c
c:\users\rap\desktop\bots\erickbot\node_modules\node-opus\deps\opus\src\opus_encoder.c(655): warning C4334: '<<': result of 32-bit shift imp
licitly converted to 64 bits (was 64-bit shift intended?) [C:\Users\RAP\Desktop\bots\erickbot\node_modules\node-opus\build\deps\libopus.vcxp
roj]
c:\users\rap\desktop\bots\erickbot\node_modules\node-opus\deps\opus\src\opus_encoder.c(728): warning C4334: '<<': result of 32-bit shift imp
licitly converted to 64 bits (was 64-bit shift intended?) [C:\Users\RAP\Desktop\bots\erickbot\node_modules\node-opus\build\deps\libopus.vcxp
roj]
  repacketizer.c
  analysis.c
  mlp.c
  mlp_data.c
  bands.c
  celt.c
  celt_encoder.c
  celt_decoder.c
  cwrs.c
  entcode.c
  entdec.c
  entenc.c
  kiss_fft.c
  laplace.c
  mathops.c
  mdct.c
  modes.c
  pitch.c
  celt_lpc.c
  quant_bands.c
  rate.c
  vq.c
  CNG.c
  code_signs.c
  init_decoder.c
  decode_core.c
  decode_frame.c
  decode_parameters.c
  decode_indices.c
  decode_pulses.c
  decoder_set_fs.c
  dec_API.c
  enc_API.c
  encode_indices.c
  encode_pulses.c
  gain_quant.c
  interpolate.c
  LP_variable_cutoff.c
  NLSF_decode.c
  NSQ.c
  NSQ_del_dec.c
  PLC.c
  shell_coder.c
  tables_gain.c
  tables_LTP.c
  tables_NLSF_CB_NB_MB.c
  tables_NLSF_CB_WB.c
  tables_other.c
  tables_pitch_lag.c
  tables_pulses_per_block.c
  VAD.c
  control_audio_bandwidth.c
  quant_LTP_gains.c
  VQ_WMat_EC.c
  HP_variable_cutoff.c
  NLSF_encode.c
  NLSF_VQ.c
  NLSF_unpack.c
  NLSF_del_dec_quant.c
  process_NLSFs.c
  stereo_LR_to_MS.c
  stereo_MS_to_LR.c
  check_control_input.c
  control_SNR.c
  init_encoder.c
  control_codec.c
  A2NLSF.c
  ana_filt_bank_1.c
  biquad_alt.c
  bwexpander_32.c
  bwexpander.c
  debug.c
  decode_pitch.c
  inner_prod_aligned.c
  lin2log.c
  log2lin.c
  LPC_analysis_filter.c
  LPC_inv_pred_gain.c
  table_LSF_cos.c
  NLSF2A.c
  NLSF_stabilize.c
  NLSF_VQ_weights_laroia.c
  pitch_est_tables.c
  resampler.c
  resampler_down2_3.c
  resampler_down2.c
  resampler_private_AR2.c
  resampler_private_down_FIR.c
  resampler_private_IIR_FIR.c
  resampler_private_up2_HQ.c
  resampler_rom.c
  sigm_Q15.c
  sort.c
  sum_sqr_shift.c
  stereo_decode_pred.c
  stereo_encode_pred.c
  stereo_find_predictor.c
  stereo_quant_pred.c
  apply_sine_window_FLP.c
  corrMatrix_FLP.c
  encode_frame_FLP.c
  find_LPC_FLP.c
  find_LTP_FLP.c
  find_pitch_lags_FLP.c
  find_pred_coefs_FLP.c
  LPC_analysis_filter_FLP.c
  LTP_analysis_filter_FLP.c
  LTP_scale_ctrl_FLP.c
  noise_shape_analysis_FLP.c
  prefilter_FLP.c
  process_gains_FLP.c
  regularize_correlations_FLP.c
  residual_energy_FLP.c
  solve_LS_FLP.c
  warped_autocorrelation_FLP.c
  wrappers_FLP.c
  autocorrelation_FLP.c
  burg_modified_FLP.c
  bwexpander_FLP.c
  energy_FLP.c
  inner_product_FLP.c
  k2a_FLP.c
  levinsondurbin_FLP.c
  LPC_inv_pred_gain_FLP.c
  pitch_analysis_core_FLP.c
  scale_copy_vector_FLP.c
  scale_vector_FLP.c
  schur_FLP.c
  sort_FLP.c
  win_delay_load_hook.cc
  libopus.vcxproj -> C:\Users\RAP\Desktop\bots\erickbot\node_modules\node-opus\build\Release\\libopus.lib
  node-opus.cc
  win_delay_load_hook.cc
c:\users\rap\desktop\bots\erickbot\node_modules\node-opus\src\node-opus.cc(41): warning C4099: 'OpusEncoder': type name first seen using 'st
ruct' now seen using 'class' [C:\Users\RAP\Desktop\bots\erickbot\node_modules\node-opus\build\node-opus.vcxproj]
  c:\users\rap\desktop\bots\erickbot\node_modules\node-opus\src\node-opus.cc(41): note: see declaration of 'OpusEncoder'
C:\Users\RAP\.node-gyp\8.11.1\x64\node.lib : fatal error LNK1127: library is corrupt [C:\Users\RAP\Desktop\bots\erickbot\node_modules\node-o
pus\build\node-opus.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\RAP\Desktop\bots\erickbot\node_modules\node-opus
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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!     C:\Users\RAP\AppData\Roaming\npm-cache\_logs\2018-04-29T02_37_05_817Z-debug.log

Using Windows 10, 64-bit

Installation Problem!

D:\Software Development\Discord Bot\JS>npm install discord.js node-opus --save

[email protected] install D:\Software Development\Discord Bot\JS\node_modules\ref
node-gyp rebuild

D:\Software Development\Discord Bot\JS\node_modules\ref>if not defined npm_confi
g_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\..
..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT
HON env variable.
gyp ERR! stack at failNoPython (C:\Program Files\nodejs\node_modules\npm\nod
e_modules\node-gyp\lib\configure.js:449:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:404:11
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\grac
eful-fs\polyfills.js:264:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodej
s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd D:\Software Development\Discord Bot\JS\node_modules\ref
gyp ERR! node -v v6.10.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
D:\Software Development\Discord Bot\JS
+-- [email protected]
+-- UNMET PEER DEPENDENCY erlpack@hammerandchisel/erlpack#master
+-- UNMET DEPENDENCY node-opus@latest
+-- UNMET PEER DEPENDENCY [email protected]
`-- UNMET PEER DEPENDENCY [email protected]

npm WARN enoent ENOENT: no such file or directory, open 'D:\Software Development
\Discord Bot\JS\package.json'
npm WARN [email protected] requires a peer of erlpack@hammerandchisel/erlpack#ma
ster but none was installed.
npm WARN [email protected] requires a peer of opusscript@^0.0.1 but none was ins
talled.
npm WARN [email protected] requires a peer of uws@^0.12.0 but none was installed
.
npm WARN JS No description
npm WARN JS No repository field.
npm WARN JS No README data
npm WARN JS No license field.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\
node_modules\npm\bin\npm-cli.js" "install" "discord.js" "node-opus" "--save"
npm ERR! node v6.10.2
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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 ref 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 ref
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ref
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! D:\Software Development\Discord Bot\JS\npm-debug.log

D:\Software Development\Discord Bot\JS>

node-gyp rebuild error: "`make` failed with exit code: 2"

I'm unable to install node-opus for use with discord.js.
Distro: Ubuntu 16.04.1 LTS

root@ubuntu-512mb-sfo1-01:/home/bots/ivona-bot# npm install node-opus

> [email protected] install /home/bots/ivona-bot/node_modules/ref
> node-gyp rebuild

make: Entering directory '/home/bots/ivona-bot/node_modules/ref/build'
  CXX(target) Release/obj.target/binding/src/binding.o
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
binding.target.mk:94: recipe for target 'Release/obj.target/binding/src/binding.o' failed
make: *** [Release/obj.target/binding/src/binding.o] Error 4
make: Leaving directory '/home/bots/ivona-bot/node_modules/ref/build'
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:215:12)
gyp ERR! System Linux 4.4.0-45-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/bots/ivona-bot/node_modules/ref
gyp ERR! node -v v7.0.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN [email protected] No repository field.
npm ERR! Linux 4.4.0-45-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "node-opus"
npm ERR! node v7.0.0
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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 ref 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 ref
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ref
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/bots/ivona-bot/npm-debug.log

Encoding raw PCM stream fails with "TypeError: Invalid non-string/buffer chunk"

On Mac OS X, and recording with the "mic" package from NPM, which uses SOX to access built-in mic.

Example code:

var rate = 16000;
var frame_size = rate/100;
var channels = 1;
var opus = require('node-opus');
var opusEncodeStream = new opus.Encoder(rate, channels, frame_size);
var outputFileStream = fs.WriteStream('stream.opus');
micInputStream.pipe(opusEncodeStream).pipe(outputFileStream);

It fails as soon as the stream starts with error: "TypeError: Invalid non-string/buffer chunk"

I can record the same way with the "mic" package, write the raw stream to file, and encoding works fine here:

opusenc --raw --raw-rate 16000 --raw-chan 1 stream.raw stream.opus

Android Support

Though my android supports node, I get this error everytime I do an npm install

$ npm install
npm ERR! Linux 3.10.49-g80097ed
npm ERR! argv "/data/data/com.termux/files/usr/bin/node" "/data/data/com.termux/files/usr/bin/npm" "install"
npm ERR! node v6.9.3
npm ERR! npm  v3.10.10
npm ERR! code EBADPLATFORM

npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"linux,darwin,win32","arch":"x64,arm,ia32"} (current: {"os":"android","arch":"arm"})
npm ERR! notsup Valid OS:    linux,darwin,win32
npm ERR! notsup Valid Arch:  x64,arm,ia32
npm ERR! notsup Actual OS:   android
npm ERR! notsup Actual Arch: arm

npm ERR! Please include the following file with any support request:
npm ERR!     /data/data/com.termux/files/home/ReviveBot/npm-debug.log```

Appreciable delays when immediately decoding from encoding.

[Read newest for current question concerning this toy case]

I was writing a little sanity check test and discovered I cannot immediately encode and decode. Is there something I am missing in the code below? I am getting a bad headers error on the decoder. The sound coming through from generate is good, if I pull both encoder and decoder out I can hear it. Similarly, I can swap this out for TooTallNate/node-lame and with the same pattern encode-decode to the speaker just fine.

var rate = 48000;
var frame_size = rate/100;
var opusEncodeStream = new opus.Encoder(rate, 2, frame_size);
var opusDecodeStream = new opus.Decoder(rate, 2, frame_size);
generate.pipe(opusEncodeStream).pipe(opusDecodeStream).pipe(speaker)
Error: Unhandled "error" event. (Bad header)
    at Decoder.emit (events.js:185:19)
    at Decoder.onerror (_stream_readable.js:664:12)

Error on installition

I would like to handle this situation by myself and not to bother others but i couldn't. I have reinstalled visual studio and have python2.7 correctly put on a path.

gyp ERR! build error
gyp ERR! stack Error: msbuild failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\WINDOWS\system32\node_modules\node-opus
gyp ERR! node -v v10.3.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\WINDOWS\system32\package.json'
npm WARN [email protected] requires a peer of ogg.js@~0.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN system32 No description
npm WARN system32 No repository field.
npm WARN system32 No README data
npm WARN system32 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\speaker):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! C:\Users\Orkun\AppData\Roaming\npm-cache_logs\2018-05-31T00_58_01_742Z-debug.log

I also got an error saying: C:\WINDOWS\system32\node_modules\node-opus\build\deps\libopus.vcxproj(20,3): error MSB4019: Imported "C:\Microsoft.Cpp.Default.props" project can not be found, correct . Before that it wanted me to correct something else and when i corrected that (at least i guess so) it popped this. And before that it has also wanted me to correct something about Visual Studio which led me to reinstall it.

Installation Failed(Another One, I Know)

Hello,

Once installing, configuring and building the node-gyp successfully, and having the windows-build-tools installed and added to PATH, I still get an error when trying to install node-opus.

Error:

gyp ERR! build error
gyp ERR! stack Error: C:\Program Files\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\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:219:12)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\gebruiker\Documents\Discord Bots\CMFM!\node_modules\node-opus
gyp ERR! node -v v6.11.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\gebruiker\Documents\Discord Bots\CMFM!\node_modules\ref\package.json'
npm WARN [email protected] requires a peer of bufferutil@^3.0.2 but none was installed.
npm WARN [email protected] requires a peer of erlpack@hammerandchisel/erlpack but none was installed.
npm WARN [email protected] requires a peer of opusscript@^0.0.3 but none was installed.
npm WARN [email protected] requires a peer of sodium@^2.0.1 but none was installed.
npm WARN [email protected] requires a peer of libsodium-wrappers@^0.5.4 but none was installed.
npm WARN [email protected] requires a peer of uws@^0.14.5 but none was installed.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "node-opus"
npm ERR! node v6.11.5
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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 node-opus 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 node-opus
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-opus
npm ERR! There is likely additional logging output above.

I tried almost everything now, fixed many errors on my own, and now I get this, which I can't fix for some reason. Been doing this for nearly 5 hours straight.

Installation failed

Hey, I'm getting this error while trying to install node-opus

Error:

[email protected] install C:\Users\tomki\Documents\wastedsociallife\shitty-discord-bot\node_modules\ref
node-gyp rebuild

C:\Users\tomki\Documents\wastedsociallife\shitty-discord-bot\node_modules\ref>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Wind
ows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\tomki\Documents\wastedsociallife\shitty-discord-bot\node_modules
ref\build\binding.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\tomki\Documents\wastedsociallife\shitty-discord-bot\node_modules\ref
gyp ERR! node -v v8.9.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

[email protected] install C:\Users\tomki\Documents\wastedsociallife\shitty-discord-bot\node_modules\node-opus
node-gyp rebuild

C:\Users\tomki\Documents\wastedsociallife\shitty-discord-bot\node_modules\node-opus>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Wind
ows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\tomki\Documents\wastedsociallife\shitty-discord-bot\node_modules
node-opus\build\deps\libopus.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\tomki\Documents\wastedsociallife\shitty-discord-bot\node_modules\node-opus
gyp ERR! node -v v8.9.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN [email protected] requires a peer of bufferutil@^3.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of libsodium-wrappers@^0.5.4 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of uws@^9.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\ref):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! C:\Users\tomki\AppData\Roaming\npm-cache_logs\2018-01-27T15_37_33_519Z-debug.log

My computer is 64 bits, and i have windows SDK 10.0 installed.

Installation Issue on Linux x64

This is NOT on Windows, that's a path I wish I never went down. This is on a fresh install of a Debian-based Linux x64 installation on a VPS from DigitalOcean.

What should happen:

root@server:~/Mikolai# npm install node-opus
+ [email protected]
installed 1 package in 7.052s
root@server:~/Mikolai#

What actually happens: (exaggeration)

root@server:~/Mikolai# npm install node-opus
npm ERR! check engine
root@server:~/Mikolai#
Click to expand for full logs
root@server:~/Mikolai# npm install node-opus

> [email protected] install /root/Mikolai/node_modules/ref
> node-gyp rebuild

make: Entering directory '/root/Mikolai/node_modules/ref/build'
  CXX(target) Release/obj.target/binding/src/binding.o
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
binding.target.mk:95: recipe for target 'Release/obj.target/binding/src/binding.o' failed
make: *** [Release/obj.target/binding/src/binding.o] Error 4
make: Leaving directory '/root/Mikolai/node_modules/ref/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:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.4.0-130-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/Mikolai/node_modules/ref
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

> [email protected] install /root/Mikolai/node_modules/node-opus
> node-gyp rebuild

make: Entering directory '/root/Mikolai/node_modules/node-opus/build'
  CC(target) Release/obj.target/libopus/deps/opus/src/opus.o
  CC(target) Release/obj.target/libopus/deps/opus/src/opus_decoder.o
  CC(target) Release/obj.target/libopus/deps/opus/src/opus_encoder.o
  CC(target) Release/obj.target/libopus/deps/opus/src/opus_multistream.o
  CC(target) Release/obj.target/libopus/deps/opus/src/opus_multistream_encoder.o
  CC(target) Release/obj.target/libopus/deps/opus/src/opus_multistream_decoder.o
  CC(target) Release/obj.target/libopus/deps/opus/src/repacketizer.o
  CC(target) Release/obj.target/libopus/deps/opus/src/analysis.o
  CC(target) Release/obj.target/libopus/deps/opus/src/mlp.o
  CC(target) Release/obj.target/libopus/deps/opus/src/mlp_data.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/bands.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/celt.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/celt_encoder.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/celt_decoder.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/cwrs.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/entcode.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/entdec.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/entenc.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/kiss_fft.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/laplace.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/mathops.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/mdct.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/modes.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/pitch.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/celt_lpc.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/quant_bands.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/rate.o
  CC(target) Release/obj.target/libopus/deps/opus/celt/vq.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/CNG.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/code_signs.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/init_decoder.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/decode_core.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/decode_frame.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/decode_parameters.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/decode_indices.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/decode_pulses.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/decoder_set_fs.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/dec_API.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/enc_API.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/encode_indices.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/encode_pulses.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/gain_quant.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/interpolate.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/LP_variable_cutoff.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_decode.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/NSQ.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/NSQ_del_dec.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/PLC.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/shell_coder.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/tables_gain.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/tables_LTP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/tables_NLSF_CB_NB_MB.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/tables_NLSF_CB_WB.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/tables_other.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/tables_pitch_lag.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/tables_pulses_per_block.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/VAD.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/control_audio_bandwidth.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/quant_LTP_gains.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/VQ_WMat_EC.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/HP_variable_cutoff.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_encode.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_VQ.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_unpack.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_del_dec_quant.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/process_NLSFs.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_LR_to_MS.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_MS_to_LR.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/check_control_input.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/control_SNR.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/init_encoder.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/control_codec.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/A2NLSF.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/ana_filt_bank_1.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/biquad_alt.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/bwexpander_32.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/bwexpander.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/debug.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/decode_pitch.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/inner_prod_aligned.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/lin2log.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/log2lin.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/LPC_analysis_filter.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/LPC_inv_pred_gain.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/table_LSF_cos.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF2A.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_stabilize.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_VQ_weights_laroia.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/pitch_est_tables.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/resampler.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_down2_3.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_down2.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_private_AR2.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_private_down_FIR.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_private_IIR_FIR.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_private_up2_HQ.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_rom.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/sigm_Q15.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/sort.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/sum_sqr_shift.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_decode_pred.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_encode_pred.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_find_predictor.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_quant_pred.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/apply_sine_window_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/corrMatrix_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/encode_frame_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/find_LPC_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/find_LTP_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/find_pitch_lags_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/find_pred_coefs_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/LPC_analysis_filter_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/LTP_analysis_filter_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/LTP_scale_ctrl_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/noise_shape_analysis_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/prefilter_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/process_gains_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/regularize_correlations_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/residual_energy_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/solve_LS_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/warped_autocorrelation_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/wrappers_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/autocorrelation_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/burg_modified_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/bwexpander_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/energy_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/inner_product_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/k2a_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/levinsondurbin_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/LPC_inv_pred_gain_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/pitch_analysis_core_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/scale_copy_vector_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/scale_vector_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/schur_FLP.o
  CC(target) Release/obj.target/libopus/deps/opus/silk/float/sort_FLP.o
  AR(target) Release/obj.target/deps/opus.a
  COPY Release/opus.a
  CXX(target) Release/obj.target/node-opus/src/node-opus.o
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
node-opus.target.mk:144: recipe for target 'Release/obj.target/node-opus/src/node-opus.o' failed
make: *** [Release/obj.target/node-opus/src/node-opus.o] Error 4
make: Leaving directory '/root/Mikolai/node_modules/node-opus/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:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.4.0-130-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/Mikolai/node_modules/node-opus
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN [email protected] requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of opusscript@^0.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/ref):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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!     /root/.npm/_logs/2018-07-19T13_42_40_755Z-debug.log
root@server:~/Mikolai#

Yes, I have build-essentials, auto-conf, libtool, as well as node-gyp, I had enough headaches with half installed software.

I've also pulled the git repository and manually built it with ./configure --enable-static --disable-shared --with-pic and then make, and dragged it to the node_modules folder, but that cropped up another issue about missing bindings, so I then tried node-gyp rebuild, which starts up and requires the module without a hitch, but when it came to using the module it crashes without an error log.

God have mercy on my tortured soul.

Publish version 2.2 to npm

Thanks for the awesome project! Can yoy publish 2.2 to npm.

$ npm view node-opus 

{ name: 'node-opus',
  description: 'NodeJS native binding to OPUS',
  'dist-tags': { latest: '0.2.1' },
  versions: 
   [ '0.1.0',
     '0.1.1',
     '0.1.2',
     '0.1.3',
     '0.1.4',
     '0.1.5',
     '0.1.6',
     '0.1.7',
     '0.1.8',
     '0.1.9',
     '0.1.10',
     '0.1.11',
     '0.1.12',
     '0.1.13',
     '0.2.0',
     '0.2.1' ],
  maintainers: [ 'rantanen <[email protected]>' ],
  time: 
   { modified: '2016-06-27T14:15:55.331Z',
     created: '2015-04-27T19:12:13.858Z',
     '0.1.0': '2015-04-27T19:12:13.858Z',
     '0.1.1': '2015-04-28T18:19:14.595Z',
     '0.1.2': '2015-04-28T20:54:34.206Z',
     '0.1.3': '2015-05-06T19:43:32.614Z',
     '0.1.4': '2015-05-06T21:01:27.903Z',
     '0.1.5': '2015-05-15T13:34:10.095Z',
     '0.1.6': '2015-05-19T20:51:38.050Z',
     '0.1.7': '2015-05-19T22:07:05.949Z',
     '0.1.8': '2015-05-19T22:12:55.829Z',
     '0.1.9': '2015-05-20T00:32:33.163Z',
     '0.1.10': '2015-07-06T14:44:34.278Z',
     '0.1.11': '2015-09-29T22:49:17.720Z',
     '0.1.12': '2016-01-23T14:05:42.642Z',
     '0.1.13': '2016-04-30T21:57:45.352Z',
     '0.2.0': '2016-06-05T21:15:26.562Z',
     '0.2.1': '2016-06-27T14:15:55.331Z' },
  //...

Opus 1.3 wonderings

Do you have any idea if this package would work with opus 1.3-rc ?
I would like to test the ambisonic experimental features.

Installation Problems

I can't seem to get it install.
I'm using this on Ubuntu x64
I used
npm install node-opus --save
and i get this.

gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack     at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack     at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack     at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:42:5
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Linux 4.4.0-93-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/Jackie.js/node_modules/node-opus
gyp ERR! node -v v8.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

Installation failed

C:\Users\owner\Documents\Meow-Music>npm install node-opus --save

[email protected] install C:\Users\owner\Documents\Meow-Music\node_modules\ref
node-gyp rebuild

C:\Users\owner\Documents\Meow-Music\node_modules\ref>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:454:19)
gyp ERR! stack at PythonFinder. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:480:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:114:15)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\owner\Documents\Meow-Music\node_modules\ref
gyp ERR! node -v v7.9.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok

[email protected] install C:\Users\owner\Documents\Meow-Music\node_modules\node-opus
node-gyp rebuild

C:\Users\owner\Documents\Meow-Music\node_modules\node-opus>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:454:19)
gyp ERR! stack at PythonFinder. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:480:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:114:15)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\owner\Documents\Meow-Music\node_modules\node-opus
gyp ERR! node -v v7.9.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
npm WARN [email protected] requires a peer of bufferutil@^3.0.0 but none was installed.
npm WARN [email protected] requires a peer of erlpack@hammerandchisel/erlpack but none was installed.
npm WARN [email protected] requires a peer of opusscript@^0.0.3 but none was installed.
npm WARN [email protected] requires a peer of sodium@^2.0.1 but none was installed.
npm WARN [email protected] requires a peer of libsodium-wrappers@^0.5.1 but none was installed.
npm WARN [email protected] requires a peer of uws@^0.14.1 but none was installed.
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\ref):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "node-opus" "--save"
npm ERR! node v7.9.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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 node-opus 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 node-opus
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-opus
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\owner\AppData\Roaming\npm-cache_logs\2017-07-20T00_25_26_101Z-debug.log

Is what I get when attempting to install node-opus.

Cannot open include file: 'node.h': No such file or directory

Hey! Trying to install this for discord.js, but I get this error:

> [email protected] install D:\Projects\Tuner\node_modules\plugapi\node_modules\bufferutil
> node-gyp rebuild


D:\Projects\Tuner\node_modules\plugapi\node_modules\bufferutil>if not defined npm_config_node_gyp (node "D:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  bufferutil.cc
  win_delay_load_hook.cc
..\src\bufferutil.cc(7): fatal error C1083: Cannot open include file: 'v8.h': No such file or directory [D:\Projects\Tu
ner\node_modules\plugapi\node_modules\bufferutil\build\bufferutil.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (D:\Program Files\nodejs\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:215:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\Projects\Tuner\node_modules\plugapi\node_modules\bufferutil
gyp ERR! node -v v6.10.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok

> [email protected] install D:\Projects\Tuner\node_modules\ref
> node-gyp rebuild


D:\Projects\Tuner\node_modules\ref>if not defined npm_config_node_gyp (node "D:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  binding.cc
  win_delay_load_hook.cc
..\src\binding.cc(5): fatal error C1083: Cannot open include file: 'node.h': No such file or directory [D:\Projects\Tun
er\node_modules\ref\build\binding.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (D:\Program Files\nodejs\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:215:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\Projects\Tuner\node_modules\ref
gyp ERR! node -v v6.10.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
[email protected] D:\Projects\Tuner
+-- [email protected]
+-- UNMET PEER DEPENDENCY [email protected] (git://github.com/hammerandchisel/erlpack.git#fcb5637f87d8631292f639bda98232ca4266b98e)
+-- UNMET DEPENDENCY node-opus@latest
+-- UNMET PEER DEPENDENCY opusscript@^0.0.1
`-- UNMET PEER DEPENDENCY [email protected]

npm WARN [email protected] requires a peer of erlpack@hammerandchisel/erlpack#master but none was installed.
npm WARN [email protected] requires a peer of opusscript@^0.0.1 but none was installed.
npm WARN [email protected] requires a peer of uws@^0.12.0 but none was installed.
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\plugapi\node_modules\bufferutil):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "bufferutil" "node-opus" "uws" "hammerandchisel/erlpack" "--save"
npm ERR! node v6.10.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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 ref 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 ref
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ref
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     D:\Projects\Tuner\npm-debug.log

It can't find v8.h and node.h.

Invalid ELF headers when installed on Docker container

I keep getting invalid ELF header when I try and run on a docker container:
err : Error: /opt/app/node_modules/node-opus/build/Release/node-opus.node: invalid ELF header

I have node_modules in my .dockerignore and am running npm install in the docker container when it is created

Decoder crashs when using files encoded by opus-recorder

Hello,

I am trying to decode ogg-opus files encoded by opus-recorder (a RecorderJS fork by Chris-Rudmin) with the help of node-opus. Unfortunately it crashes node. The output of the format event seems also to be weird because it's always showing 44100Hz independent from my chosen encoder settings on the client, which isn't a valid rate for opus at all.
The files created by opus-recorder work fine in the browser and also in VLC.

Btw. ogg-opus doesn't crash on all files. So e.g. the included 'input.opus' works as expected.
I have no idea where to look for the problem. The native binaries are gyp-compiled on Windows using the version delivered.

It can be easily tested using opus-recorder's decoder example that does some microphone recording and stores it to a blob that can be saved to a file. Using this file with the alsa example (or a modified version that puts all data to a file stream) on node leads to the crash.

Thanks,
Robbson

Noise

When running the test

prior@cronosl ~/P/n/n/n/test> node app.js
Wrote following files.
in.pcm   : Input PCM signal
out.opus : OPUS encoded input signal
out.pcm  : Decoded PCM signal

It generates the in.pcm and out.pcm files as suspected.
However, when playing them using mplay, the out.pcm has noise while the in.pcm has not:

mplayer -rawaudio samplesize=4:channels=2:rate=48000 -demuxer in.pcm

mplayer -rawaudio samplesize=4:channels=2:rate=48000 -demuxer out.pcm

Also playing the out.opus indicates that the files duration is 0 seconds. (Mplay immediatly reaches end of file), however, the file is not empty.

prior@cronosl ~/P/n/n/n/test> ls -lAh out.opus
-rw-r--r-- 1 prior prior 67K Apr 28 11:29 out.opus
prior@cronosl ~/P/n/n/n/test> mplayer out.pcm
MPlayer SVN-r37379 (C) 2000-2015 MPlayer Team
210 audio & 441 video codecs
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing out.pcm.
libavformat version 56.25.101 (internal)


Exiting... (End of file)

VALID_RATES.contains is not a function

I'm getting this error:

TypeError: VALID_RATES.contains is not a function
at new Encoder (/home/pi/speakspoke/node_modules/node-opus/lib/Encoder.js:17:22)
at SpeakerClient. (/home/pi/speakspoke/src/client/SpeakerClient.js:17:27)

if fixed it by adding a polyfill

if (!Array.prototype.contains) {
Array.prototype.contains= function(searchElement /, fromIndex/ ) {
'use strict';
var O = Object(this);
var len = parseInt(O.length, 10) || 0;
if (len === 0) {
return false;
}
var n = parseInt(arguments[1], 10) || 0;
var k;
if (n >= 0) {
k = n;
} else {
k = len + n;
if (k < 0) {k = 0;}
}
var currentElement;
var searchIsNaN = isNaN(searchElement);
while (k < len) {
currentElement = O[k];
// SameValueZero algorithm has to treat NaN as equal to itself, but
// NaN === NaN is false, so check explicitly
// SameValueZero treats 0 and -0 as equal, as does ===, so we're fine there
if (searchElement === currentElement || (searchIsNaN && isNaN(currentElement))) {
return true;
}
k++;
}
return false;
};
}

Critical Error

Full Debug Log

Loving the module, but can't get this installed on my 64-Bit Windows v8.1 with 64-Bit Node (v4.4.3). I keep getting the above error.

I've reinstalled VS 2015 multiple times (VS 2010 couldn't be found online). I've also installed multiple SDKs in hope that'd help, without avail. Re-installed Node too. Hell, I bet reinstalling my system wouldn't help.

Any help is greatly appreciated as I need this quite urgently ๐Ÿ˜”

Error On Installation

I have no idea what to do...
But, here is the error log.
0 info it worked if it ends with ok 1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', 1 verbose cli 'C:\\Users\\benbe\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'install', 1 verbose cli 'node-opus' ] 2 info using [email protected] 3 info using [email protected] 4 verbose config Skipping project config: C:\Users\benbe/.npmrc. (matches userconfig) 5 verbose npm-session f3fcc3badadecf70 6 silly install loadCurrentTree 7 silly install readLocalPackageData 8 http fetch GET 200 https://registry.npmjs.org/node-opus 16ms (from cache) 9 silly pacote tag manifest for node-opus@latest fetched in 33ms 10 timing stage:loadCurrentTree Completed in 820ms 11 silly install loadIdealTree 12 silly install cloneCurrentTreeToIdealTree 13 timing stage:loadIdealTree:cloneCurrentTree Completed in 5ms 14 silly install loadShrinkwrap 15 timing stage:loadIdealTree:loadShrinkwrap Completed in 174ms 16 silly install loadAllDepsIntoIdealTree 17 silly resolveWithNewModule [email protected] checking installable status 18 http fetch GET 200 https://registry.npmjs.org/bindings 8ms (from cache) 19 http fetch GET 200 https://registry.npmjs.org/ogg-packet 8ms (from cache) 20 http fetch GET 200 https://registry.npmjs.org/commander 9ms (from cache) 21 silly pacote range manifest for bindings@~1.2.1 fetched in 13ms 22 silly resolveWithNewModule [email protected] checking installable status 23 silly pacote range manifest for ogg-packet@^1.0.0 fetched in 12ms 24 silly resolveWithNewModule [email protected] checking installable status 25 silly pacote range manifest for commander@^2.9.0 fetched in 12ms 26 silly resolveWithNewModule [email protected] checking installable status 27 http fetch GET 200 https://registry.npmjs.org/ref-struct 2ms (from cache) 28 silly pacote range manifest for ref-struct@* fetched in 3ms 29 silly resolveWithNewModule [email protected] checking installable status 30 http fetch GET 200 https://registry.npmjs.org/ref 3ms (from cache) 31 silly pacote range manifest for ref@1 fetched in 4ms 32 silly resolveWithNewModule [email protected] checking installable status 33 timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 225ms 34 timing stage:loadIdealTree Completed in 453ms 35 silly currentTree [email protected] 35 silly currentTree +-- @types/[email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree |-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree | -- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree | -- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree | -- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree | -- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree | -- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | | -- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | | -- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | | -- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | | -- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | | -- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | +-- [email protected]
35 silly currentTree | | -- [email protected] 35 silly currentTree | +-- [email protected] 35 silly currentTree | -- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree | -- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree +-- [email protected] 35 silly currentTree | -- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree +-- [email protected]
35 silly currentTree -- [email protected] 36 silly idealTree [email protected] 36 silly idealTree +-- @types/[email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree | -- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree | -- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree | -- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree | -- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree | -- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree | -- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | | -- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | | -- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | | -- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | | -- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | | -- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | +-- [email protected]
36 silly idealTree | | -- [email protected] 36 silly idealTree | +-- [email protected] 36 silly idealTree | -- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree | -- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree | -- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree +-- [email protected]
36 silly idealTree | -- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree +-- [email protected] 36 silly idealTree -- [email protected]
37 silly install generateActionsToTake
38 timing stage:generateActionsToTake Completed in 49ms
39 silly diffTrees action count 6
40 silly diffTrees add [email protected]
41 silly diffTrees add [email protected]
42 silly diffTrees add [email protected]
43 silly diffTrees add [email protected]
44 silly diffTrees add [email protected]
45 silly diffTrees add [email protected]
46 silly decomposeActions action count 48
47 silly decomposeActions fetch [email protected]
48 silly decomposeActions extract [email protected]
49 silly decomposeActions preinstall [email protected]
50 silly decomposeActions build [email protected]
51 silly decomposeActions install [email protected]
52 silly decomposeActions postinstall [email protected]
53 silly decomposeActions finalize [email protected]
54 silly decomposeActions refresh-package-json [email protected]
55 silly decomposeActions fetch [email protected]
56 silly decomposeActions extract [email protected]
57 silly decomposeActions preinstall [email protected]
58 silly decomposeActions build [email protected]
59 silly decomposeActions install [email protected]
60 silly decomposeActions postinstall [email protected]
61 silly decomposeActions finalize [email protected]
62 silly decomposeActions refresh-package-json [email protected]
63 silly decomposeActions fetch [email protected]
64 silly decomposeActions extract [email protected]
65 silly decomposeActions preinstall [email protected]
66 silly decomposeActions build [email protected]
67 silly decomposeActions install [email protected]
68 silly decomposeActions postinstall [email protected]
69 silly decomposeActions finalize [email protected]
70 silly decomposeActions refresh-package-json [email protected]
71 silly decomposeActions fetch [email protected]
72 silly decomposeActions extract [email protected]
73 silly decomposeActions preinstall [email protected]
74 silly decomposeActions build [email protected]
75 silly decomposeActions install [email protected]
76 silly decomposeActions postinstall [email protected]
77 silly decomposeActions finalize [email protected]
78 silly decomposeActions refresh-package-json [email protected]
79 silly decomposeActions fetch [email protected]
80 silly decomposeActions extract [email protected]
81 silly decomposeActions preinstall [email protected]
82 silly decomposeActions build [email protected]
83 silly decomposeActions install [email protected]
84 silly decomposeActions postinstall [email protected]
85 silly decomposeActions finalize [email protected]
86 silly decomposeActions refresh-package-json [email protected]
87 silly decomposeActions fetch [email protected]
88 silly decomposeActions extract [email protected]
89 silly decomposeActions preinstall [email protected]
90 silly decomposeActions build [email protected]
91 silly decomposeActions install [email protected]
92 silly decomposeActions postinstall [email protected]
93 silly decomposeActions finalize [email protected]
94 silly decomposeActions refresh-package-json [email protected]
95 silly install executeActions
96 silly doSerial global-install 48
97 verbose correctMkdir C:\Users\benbe\AppData\Roaming\npm-cache_locks correctMkdir not in flight; initializing
98 timing audit compress Completed in 4ms
99 info audit Submitting payload of 10078bytes
100 verbose lock using C:\Users\benbe\AppData\Roaming\npm-cache_locks\staging-c53b8475059bad49.lock for C:\Users\benbe\node_modules.staging
101 silly doParallel extract 6
102 silly extract [email protected]
103 silly extract [email protected]
104 silly extract [email protected]
105 silly extract [email protected]
106 silly extract [email protected]
107 silly extract [email protected]
108 silly tarball trying bindings@1.2.1 by hash: sha1-FK1hE4EtLTfXLme0ystLtyZQXxE=
109 silly tarball trying ref@1 by hash: sha512-2cBCniTtxcGUjDpvFfVpw323a83/0RLSGJJY5l5lcomZWhYpU2cuLdsvYqMixvsdLJ9+sTdzEkju8J8ZHDM2nA==
110 silly tarball trying ref-struct@* by hash: sha1-XV7mWtQc78Olxf60BYcmHkee3BM=
111 silly tarball trying commander@^2.9.0 by hash: sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==
112 silly tarball trying ogg-packet@^1.0.0 by hash: sha1-RbiFchrI991c8iOR1CEGrlM6xng=
113 silly tarball trying node-opus@latest by hash: sha512-Hih2TCi/vQUY4D9PBiATT6fluJSjMJPLBfCNgAxJx03v6jT+UlVmXUKR62RXYWyijhXNghsFJMyeBe7MBm3cmQ==
114 silly extract bindings@1.2.1 extracted to C:\Users\benbe\node_modules.staging\bindings-3022664e (72ms)
115 silly extract ogg-packet@^1.0.0 extracted to C:\Users\benbe\node_modules.staging\ogg-packet-32cb5f0c (81ms)
116 silly extract commander@^2.9.0 extracted to C:\Users\benbe\node_modules.staging\commander-9054fc67 (114ms)
117 silly extract ref-struct@* extracted to C:\Users\benbe\node_modules.staging\ref-struct-f5f1e04e (115ms)
118 silly extract ref@1 extracted to C:\Users\benbe\node_modules.staging\ref-bcaac743 (240ms)
119 timing audit submit Completed in 557ms
120 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 557ms
121 timing audit body Completed in 0ms
122 silly extract node-opus@latest extracted to C:\Users\benbe\node_modules.staging\node-opus-f8720ed4 (1867ms)
123 timing action:extract Completed in 1872ms
124 silly doReverseSerial unbuild 48
125 silly doSerial remove 48
126 silly doSerial move 48
127 silly doSerial finalize 48
128 silly finalize C:\Users\benbe\node_modules\bindings
129 silly finalize C:\Users\benbe\node_modules\ref
130 silly finalize C:\Users\benbe\node_modules\ref-struct
131 silly finalize C:\Users\benbe\node_modules\node-opus\node_modules\commander
132 silly finalize C:\Users\benbe\node_modules\ogg-packet
133 silly finalize C:\Users\benbe\node_modules\node-opus
134 timing action:finalize Completed in 15ms
135 silly doParallel refresh-package-json 6
136 silly refresh-package-json C:\Users\benbe\node_modules\bindings
137 silly refresh-package-json C:\Users\benbe\node_modules\ref
138 silly refresh-package-json C:\Users\benbe\node_modules\ref-struct
139 silly refresh-package-json C:\Users\benbe\node_modules\node-opus\node_modules\commander
140 silly refresh-package-json C:\Users\benbe\node_modules\ogg-packet
141 silly refresh-package-json C:\Users\benbe\node_modules\node-opus
142 timing action:refresh-package-json Completed in 436ms
143 silly doParallel preinstall 6
144 silly preinstall [email protected]
145 info lifecycle [email protected]
preinstall: [email protected]
146 silly preinstall [email protected]
147 info lifecycle [email protected]
preinstall: [email protected]
148 silly preinstall [email protected]
149 info lifecycle [email protected]preinstall: [email protected]
150 silly preinstall [email protected]
151 info lifecycle [email protected]
preinstall: [email protected]
152 silly preinstall [email protected]
153 info lifecycle [email protected]preinstall: [email protected]
154 silly preinstall [email protected]
155 info lifecycle [email protected]
preinstall: [email protected]
156 timing action:preinstall Completed in 2ms
157 silly doSerial build 48
158 silly build [email protected]
159 info linkStuff [email protected]
160 silly linkStuff [email protected] has C:\Users\benbe\node_modules as its parent node_modules
161 silly build [email protected]
162 info linkStuff [email protected]
163 silly linkStuff [email protected] has C:\Users\benbe\node_modules as its parent node_modules
164 silly build [email protected]
165 info linkStuff [email protected]
166 silly linkStuff [email protected] has C:\Users\benbe\node_modules as its parent node_modules
167 silly build [email protected]
168 info linkStuff [email protected]
169 silly linkStuff [email protected] has C:\Users\benbe\node_modules\node-opus\node_modules as its parent node_modules
170 silly build [email protected]
171 info linkStuff [email protected]
172 silly linkStuff [email protected] has C:\Users\benbe\node_modules as its parent node_modules
173 silly build [email protected]
174 info linkStuff [email protected]
175 silly linkStuff [email protected] has C:\Users\benbe\node_modules as its parent node_modules
176 timing action:build Completed in 2ms
177 silly doSerial global-link 48
178 silly doParallel update-linked 0
179 silly doSerial install 48
180 silly install [email protected]
181 info lifecycle [email protected]install: [email protected]
182 silly install [email protected]
183 info lifecycle [email protected]
install: [email protected]
184 verbose lifecycle [email protected]install: unsafe-perm in lifecycle true
185 verbose lifecycle [email protected]
install: PATH: C:\Users\benbe\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\benbe\node_modules\ref\node_modules.bin;C:\Users\benbe\node_modules.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\dotnet;C:\Program Files\nodejs;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Git\cmd;C:\Users\benbe\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Heroku\bin;C:\Program Files\Microsoft VS Code\bin;C:\Users\benbe\AppData\Roaming\npm;;C:\Users\benbe\AppData\Local\Programs\Microsoft VS Code\bin
186 verbose lifecycle [email protected]install: CWD: C:\Users\benbe\node_modules\ref
187 silly lifecycle [email protected]
install: Args: [ '/d /s /c', 'node-gyp rebuild' ]
188 silly lifecycle [email protected]install: Returned: code: 1 signal: null
189 info lifecycle [email protected]
install: Failed to exec install script
190 silly install [email protected]
191 info lifecycle [email protected]install: [email protected]
192 silly install [email protected]
193 info lifecycle [email protected]
install: [email protected]
194 verbose lifecycle [email protected]install: unsafe-perm in lifecycle true
195 verbose lifecycle [email protected]
install: PATH: C:\Users\benbe\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\benbe\node_modules\node-opus\node_modules.bin;C:\Users\benbe\node_modules.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\dotnet;C:\Program Files\nodejs;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Git\cmd;C:\Users\benbe\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Heroku\bin;C:\Program Files\Microsoft VS Code\bin;C:\Users\benbe\AppData\Roaming\npm;;C:\Users\benbe\AppData\Local\Programs\Microsoft VS Code\bin
196 verbose lifecycle [email protected]install: CWD: C:\Users\benbe\node_modules\node-opus
197 silly lifecycle [email protected]
install: Args: [ '/d /s /c', 'node-gyp rebuild' ]
198 silly lifecycle [email protected]install: Returned: code: 1 signal: null
199 info lifecycle [email protected]
install: Failed to exec install script
200 timing action:install Completed in 734ms
201 verbose unlock done using C:\Users\benbe\AppData\Roaming\npm-cache_locks\staging-c53b8475059bad49.lock for C:\Users\benbe\node_modules.staging
202 timing stage:rollbackFailedOptional Completed in 200ms
203 timing stage:runTopLevelLifecycles Completed in 4718ms
204 silly saveTree [email protected]
204 silly saveTree +-- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | -- [email protected] 204 silly saveTree | +-- [email protected] 204 silly saveTree | -- [email protected]
204 silly saveTree +-- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | | +-- [email protected]
204 silly saveTree | | | +-- [email protected]
204 silly saveTree | | | +-- [email protected]
204 silly saveTree | | | -- [email protected] 204 silly saveTree | | | +-- [email protected] 204 silly saveTree | | | | -- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | -- [email protected] 204 silly saveTree | | | +-- [email protected] 204 silly saveTree | | | | +-- [email protected] 204 silly saveTree | | | | -- [email protected]
204 silly saveTree | | | +-- [email protected]
204 silly saveTree | | | | -- [email protected] 204 silly saveTree | | | | -- [email protected]
204 silly saveTree | | | +-- [email protected]
204 silly saveTree | | | +-- [email protected]
204 silly saveTree | | | +-- [email protected]
204 silly saveTree | | | -- [email protected] 204 silly saveTree | | +-- [email protected] 204 silly saveTree | | +-- [email protected] 204 silly saveTree | | -- [email protected]
204 silly saveTree | | +-- [email protected]
204 silly saveTree | | +-- [email protected]
204 silly saveTree | | | +-- [email protected]
204 silly saveTree | | | +-- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | | -- [email protected] 204 silly saveTree | | | | +-- [email protected] 204 silly saveTree | | | | +-- [email protected] 204 silly saveTree | | | | -- [email protected]
204 silly saveTree | | | +-- [email protected]
204 silly saveTree | | | | -- [email protected] 204 silly saveTree | | | +-- [email protected] 204 silly saveTree | | | | +-- [email protected] 204 silly saveTree | | | | -- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | -- [email protected] 204 silly saveTree | | | +-- [email protected] 204 silly saveTree | | | | +-- [email protected] 204 silly saveTree | | | | | +-- [email protected] 204 silly saveTree | | | | | -- [email protected]
204 silly saveTree | | | | | +-- [email protected]
204 silly saveTree | | | | | +-- [email protected]
204 silly saveTree | | | | | +-- [email protected]
204 silly saveTree | | | | | +-- [email protected]
204 silly saveTree | | | | | +-- [email protected]
204 silly saveTree | | | | | +-- [email protected]
204 silly saveTree | | | | | -- [email protected] 204 silly saveTree | | | | +-- [email protected] 204 silly saveTree | | | | +-- [email protected] 204 silly saveTree | | | | | +-- [email protected] 204 silly saveTree | | | | | +-- [email protected] 204 silly saveTree | | | | | +-- [email protected] 204 silly saveTree | | | | | +-- [email protected] 204 silly saveTree | | | | | +-- [email protected] 204 silly saveTree | | | | | | +-- [email protected] 204 silly saveTree | | | | | | +-- [email protected] 204 silly saveTree | | | | | | | -- [email protected]
204 silly saveTree | | | | | | -- [email protected] 204 silly saveTree | | | | | | -- [email protected]
204 silly saveTree | | | | | +-- [email protected]
204 silly saveTree | | | | | -- [email protected] 204 silly saveTree | | | | -- [email protected]
204 silly saveTree | | | +-- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | -- [email protected] 204 silly saveTree | | | +-- [email protected] 204 silly saveTree | | | | +-- [email protected] 204 silly saveTree | | | | +-- [email protected] 204 silly saveTree | | | | +-- [email protected] 204 silly saveTree | | | | +-- [email protected] 204 silly saveTree | | | | | -- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | | +-- [email protected]
204 silly saveTree | | | | | -- [email protected] 204 silly saveTree | | | | | -- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | | +-- [email protected]
204 silly saveTree | | | | | | +-- [email protected]
204 silly saveTree | | | | | | -- [email protected] 204 silly saveTree | | | | | | -- [email protected]
204 silly saveTree | | | | | -- [email protected] 204 silly saveTree | | | | +-- [email protected] 204 silly saveTree | | | | | +-- [email protected] 204 silly saveTree | | | | | +-- [email protected] 204 silly saveTree | | | | | | +-- [email protected] 204 silly saveTree | | | | | | +-- [email protected] 204 silly saveTree | | | | | | +-- [email protected] 204 silly saveTree | | | | | | -- [email protected]
204 silly saveTree | | | | | | -- [email protected] 204 silly saveTree | | | | | -- [email protected]
204 silly saveTree | | | | | +-- [email protected]
204 silly saveTree | | | | | +-- [email protected]
204 silly saveTree | | | | | +-- [email protected]
204 silly saveTree | | | | | | -- [email protected] 204 silly saveTree | | | | | +-- [email protected] 204 silly saveTree | | | | | | -- [email protected]
204 silly saveTree | | | | | +-- [email protected]
204 silly saveTree | | | | | | -- [email protected] 204 silly saveTree | | | | | +-- [email protected] 204 silly saveTree | | | | | | -- [email protected]
204 silly saveTree | | | | | +-- [email protected]
204 silly saveTree | | | | | -- [email protected] 204 silly saveTree | | | | +-- [email protected] 204 silly saveTree | | | | +-- [email protected] 204 silly saveTree | | | | +-- [email protected] 204 silly saveTree | | | | +-- [email protected] 204 silly saveTree | | | | +-- [email protected] 204 silly saveTree | | | | +-- [email protected] 204 silly saveTree | | | | +-- [email protected] 204 silly saveTree | | | | +-- [email protected] 204 silly saveTree | | | | +-- [email protected] 204 silly saveTree | | | | | -- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | -- [email protected] 204 silly saveTree | | | +-- [email protected] 204 silly saveTree | | | | -- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | | +-- [email protected]
204 silly saveTree | | | | | | -- [email protected] 204 silly saveTree | | | | | -- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | | -- [email protected] 204 silly saveTree | | | | | +-- [email protected] 204 silly saveTree | | | | | -- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | -- [email protected] 204 silly saveTree | | | +-- [email protected] 204 silly saveTree | | | +-- [email protected] 204 silly saveTree | | | | +-- [email protected] 204 silly saveTree | | | | | -- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | | -- [email protected] 204 silly saveTree | | | | | -- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | | -- [email protected] 204 silly saveTree | | | | -- [email protected]
204 silly saveTree | | | -- [email protected] 204 silly saveTree | | +-- [email protected] 204 silly saveTree | | -- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | | +-- [email protected]
204 silly saveTree | | +-- [email protected]
204 silly saveTree | | | +-- [email protected]
204 silly saveTree | | | -- [email protected] 204 silly saveTree | | | -- [email protected]
204 silly saveTree | | +-- [email protected]
204 silly saveTree | | -- [email protected] 204 silly saveTree | | +-- [email protected] 204 silly saveTree | | -- [email protected]
204 silly saveTree | | -- [email protected] 204 silly saveTree | -- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | | +-- [email protected]
204 silly saveTree | | +-- [email protected]
204 silly saveTree | | | -- [email protected] 204 silly saveTree | | | -- [email protected]
204 silly saveTree | | -- [email protected] 204 silly saveTree | | +-- [email protected] 204 silly saveTree | | | +-- [email protected] 204 silly saveTree | | | -- [email protected]
204 silly saveTree | | -- [email protected] 204 silly saveTree | +-- [email protected] 204 silly saveTree | +-- [email protected] 204 silly saveTree | +-- [email protected] 204 silly saveTree | | -- [email protected]
204 silly saveTree | -- [email protected] 204 silly saveTree | -- [email protected]
204 silly saveTree +-- [email protected]
204 silly saveTree | -- [email protected] 204 silly saveTree | -- [email protected]
204 silly saveTree +-- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | -- [email protected] 204 silly saveTree | -- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | -- [email protected] 204 silly saveTree -- [email protected]
204 silly saveTree +-- [email protected]
204 silly saveTree +-- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | | +-- [email protected]
204 silly saveTree | | +-- [email protected]
204 silly saveTree | | +-- [email protected]
204 silly saveTree | | | +-- [email protected]
204 silly saveTree | | | | +-- [email protected]
204 silly saveTree | | | | -- [email protected] 204 silly saveTree | | | -- [email protected]
204 silly saveTree | | -- [email protected] 204 silly saveTree | +-- [email protected] 204 silly saveTree | +-- [email protected] 204 silly saveTree | +-- [email protected] 204 silly saveTree | | -- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | -- [email protected] 204 silly saveTree | -- @types/[email protected]
204 silly saveTree +-- [email protected]
204 silly saveTree +-- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | -- [email protected] 204 silly saveTree | -- [email protected]
204 silly saveTree +-- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | | -- [email protected] 204 silly saveTree | +-- [email protected] 204 silly saveTree | +-- [email protected] 204 silly saveTree | +-- [email protected] 204 silly saveTree | | +-- [email protected] 204 silly saveTree | | -- [email protected]
204 silly saveTree | | -- [email protected] 204 silly saveTree | +-- [email protected] 204 silly saveTree | | +-- [email protected] 204 silly saveTree | | | +-- [email protected] 204 silly saveTree | | | +-- [email protected] 204 silly saveTree | | | +-- [email protected] 204 silly saveTree | | | -- [email protected]
204 silly saveTree | | -- [email protected] 204 silly saveTree | +-- [email protected] 204 silly saveTree | | +-- [email protected] 204 silly saveTree | | +-- [email protected] 204 silly saveTree | | | +-- [email protected] 204 silly saveTree | | | +-- [email protected] 204 silly saveTree | | | -- [email protected]
204 silly saveTree | | -- [email protected] 204 silly saveTree | | +-- [email protected] 204 silly saveTree | | +-- [email protected] 204 silly saveTree | | | -- [email protected]
204 silly saveTree | | +-- [email protected]
204 silly saveTree | | +-- [email protected]
204 silly saveTree | | | -- [email protected] 204 silly saveTree | | +-- [email protected] 204 silly saveTree | | +-- [email protected] 204 silly saveTree | | +-- [email protected] 204 silly saveTree | | -- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | +-- [email protected]
204 silly saveTree | -- [email protected] 204 silly saveTree -- [email protected]
204 silly saveTree -- [email protected] 204 silly saveTree +-- [email protected] 204 silly saveTree -- [email protected]
205 warn [email protected] requires a peer of bufferutil@^3.0.3 but none is installed. You must install peer dependencies yourself.
206 warn [email protected] requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.
207 warn [email protected] requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself.
208 warn [email protected] requires a peer of opusscript@^0.0.6 but none is installed. You must install peer dependencies yourself.
209 warn [email protected] requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself.
210 warn [email protected] requires a peer of libsodium-wrappers@^0.7.3 but none is installed. You must install peer dependencies yourself.
211 warn [email protected] requires a peer of uws@^9.14.0 but none is installed. You must install peer dependencies yourself.
212 warn [email protected] No description
213 warn [email protected] No repository field.
214 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\ref):
215 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node-gyp rebuild
215 warn optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
216 verbose optional SKIPPING OPTIONAL DEPENDENCY:
216 verbose optional Failed at the [email protected] install script.
216 verbose optional SKIPPING OPTIONAL DEPENDENCY: This is probably not a problem with npm. There is likely additional logging output above.
217 verbose stack Error: [email protected] install: node-gyp rebuild
217 verbose stack Exit status 1
217 verbose stack at EventEmitter. (C:\Users\benbe\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:304:16)
217 verbose stack at EventEmitter.emit (events.js:182:13)
217 verbose stack at ChildProcess. (C:\Users\benbe\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
217 verbose stack at ChildProcess.emit (events.js:182:13)
217 verbose stack at maybeClose (internal/child_process.js:957:16)
217 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:246:5)
218 verbose pkgid [email protected]
219 verbose cwd C:\Users\benbe\Desktop\Bot
220 verbose Windows_NT 10.0.17134
221 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\benbe\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "node-opus"
222 verbose node v10.1.0
223 verbose npm v6.4.0
224 error code ELIFECYCLE
225 error errno 1
226 error [email protected] install: node-gyp rebuild
226 error Exit status 1
227 error Failed at the [email protected] install script.
227 error This is probably not a problem with npm. There is likely additional logging output above.
228 verbose exit [ 1, true ]
`

Config for win32 ia32

I'm running this on a small bot with ia32 architecture, is there any way for you to add that as a supported architecture? I'm having issues creating a config file for it on a windows pc.

Adding Raspberry Pi (1) support

Hey, I followed the instructions in the readme to build the config.h file for my raspberry pi (and fleshed it out a bit): nfriedly@0ad226a

But, when I try to install from my repo, I get the following:

pi@raspberrypi ~/nodeplayer $ npm install https://github.com/nfriedly/node-opus
npm ERR! Linux 3.18.12+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "https://github.com/nfriedly/node-opus"
npm ERR! node v0.12.2
npm ERR! npm  v2.7.4
npm ERR! code EBADPLATFORM

npm ERR! notsup Unsupported
npm ERR! notsup Not compatible with your operating system or architecture: [email protected]
npm ERR! notsup Valid OS:    linux
npm ERR! notsup Valid Arch:  x64
npm ERR! notsup Actual OS:   linux
npm ERR! notsup Actual Arch: arm

Presumably one of the .gyp files needs to be updated, but I'm not sure which / how. Can you give me any pointers there?

Require failed

1|dtel     | Error: Module version mismatch. Expected 48, got 57.
1|dtel     |     at Error (native)
1|dtel     |     at Object.Module._extensions..node (module.js:597:18)
1|dtel     |     at Module.load (module.js:487:32)
1|dtel     |     at tryModuleLoad (module.js:446:12)
1|dtel     |     at Function.Module._load (module.js:438:3)
1|dtel     |     at Module.require (module.js:497:17)
1|dtel     |     at require (internal/module.js:20:19)
1|dtel     |     at bindings (/home/austin/node_modules/bindings/bindings.js:76:44)
1|dtel     |     at Object.<anonymous> (/home/austin/node_modules/node-opus/lib/OpusEncoder.js:4:34)
1|dtel     |     at Module._compile (module.js:570:32)
^C
[austin@runes ~]$ node -v
v8.0.0
[austin@runes ~]$ npm -v
5.0.0

you like installation error issues, right?

Good, because I've got another for you.

15 warnings generated.
  LIBTOOL-STATIC Release/opus.a
Traceback (most recent call last):
  File "./gyp-mac-tool", line 611, in <module>
    sys.exit(main(sys.argv[1:]))
  File "./gyp-mac-tool", line 28, in main
    exit_code = executor.Dispatch(args)
  File "./gyp-mac-tool", line 43, in Dispatch
    return getattr(self, method)(*args[1:])
  File "./gyp-mac-tool", line 246, in ExecFilterLibtool
    if not libtool_re.match(line) and not libtool_re5.match(line):
TypeError: cannot use a string pattern on a bytes-like object
make: *** [Release/opus.a] 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:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Darwin 17.4.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Nik/Desktop/Codage/node-opus-installation-test/node_modules/node-opus
gyp ERR! node -v v10.4.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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!     /Users/Nik/.npm/_logs/2018-06-30T05_59_18_288Z-debug.log
  • Full chaotic log available here (node-opus-test-log.txt) (sorry for file download, 750 KB is over pastebin's limit)
  • debug log is here (pastebin)
  • I know this is all in the logs, but I'm running..
    • macOS High Sierra (v10.13.3)
    • Node.js v.10.4.1 (latest stable as of today)
    • npm v6.1 (latest)
    • node-gyp v3.6.2 (not sure why it won't use latest, running node-gyp -v logs 3.7.0)
  • This was tested in an empty folder where I literally just typed npm init before trying to install node-opus

Thanks. Sorry to bother you, this is just.. beyond what I can fix myself :P
It could be a node-gyp issue, not entirely sure.

Sample rate drops on decode

Hey,

I'm trying to convert opus file back to wav file. It seems that decoding drops the sample rate from 48000 to 24000. Is there any way to avoid this?

Unable to install

Hi, I was trying to use node-opus with discord.js for a Discord Bot. When trying to install node-opus using npm i node-opus, I get this error:

C:\Users\alexr\Documents\GitHub\Discord Bot>npm i node-opus

> [email protected] install C:\Users\alexr\Documents\GitHub\Discord Bot\node_modules\ref
> node-gyp rebuild


C:\Users\alexr\Documents\GitHub\Discord Bot\node_modules\ref>if not defined npm_config_node_gyp (node "C:\Users\alexr\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\alexr\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Traceback (most recent call last):
  File "C:\Users\alexr\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 13, in <module>
    import gyp
  File "C:\Users\alexr\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 7, in <module>
    import copy
  File "C:\Python27\lib\copy.py", line 52, in <module>
    import weakref
  File "C:\Python27\lib\weakref.py", line 14, in <module>
    from _weakref import (
ImportError: cannot import name _remove_dead_weakref
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Users\alexr\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:336:16)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\alexr\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\alexr\Documents\GitHub\Discord Bot\node_modules\ref
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

> [email protected] install C:\Users\alexr\Documents\GitHub\Discord Bot\node_modules\node-opus
> node-gyp rebuild


C:\Users\alexr\Documents\GitHub\Discord Bot\node_modules\node-opus>if not defined npm_config_node_gyp (node "C:\Users\alexr\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\alexr\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Traceback (most recent call last):
  File "C:\Users\alexr\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 13, in <module>
    import gyp
  File "C:\Users\alexr\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 7, in <module>
    import copy
  File "C:\Python27\lib\copy.py", line 52, in <module>
    import weakref
  File "C:\Python27\lib\weakref.py", line 14, in <module>
    from _weakref import (
ImportError: cannot import name _remove_dead_weakref
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Users\alexr\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:336:16)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\alexr\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\alexr\Documents\GitHub\Discord Bot\node_modules\node-opus
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\ref):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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!     C:\Users\alexr\AppData\Roaming\npm-cache\_logs\2018-06-22T15_25_48_878Z-debug.log

I've made 2 alternative folders, re-installed Python, checking if Python is on the PATH (it is), installed windows-build-tools, and I haven't been able to install it.

[Question] How do you use this?

I'm sorry for appearing inexperienced, I have no clue what to do with all these pipes and streams.

Right now, I'm trying to see if I can take data from the 'lame' library and have it encode and output with this 'opus' library. However, I'm running into issue after issue and I'm sure it's just because I don't understand how this works. I've looked at the example provided and it looks like I need to get a buffer from somewhere, I've also looked at the examples folder and none of them really help.

var mp3File = fs.createReadStream('moon.mp3');
var opusFile = fs.createWriteStream('test.opus');

var mp3Decoder = new Lame.Decoder();
mp3Decoder.on('format', function(format) {
    var rate = 48000;
    var channels = 2;
    var frame_size = rate / 100;

    var opusEncoder = new Opus.OpusEncoder( rate );
    var encoded = opusEncoder.encode( format, frame_size );
});

mp3File.pipe(mp3Decoder);

Throws a C++ error:

node: ../src/node_buffer.cc:103: char* node::Buffer::Data(v8::Handle<v8::Object>): Assertion `obj->HasIndexedPropertiesInExternalArrayData()' failed.
Aborted

I assume because the format isn't an array.

var mp3File = fs.createReadStream('moon.mp3');
var opusFile = fs.createWriteStream('test.opus');

var mp3Decoder = new Lame.Decoder();
mp3Decoder.on('format', function(format) {
    var rate = 48000;
    var channels = 2;
    var frame_size = rate / 100;
    var opusEncodeStream = new Opus.Encoder(rate, channels, frame_size);

    mp3Decoder.pipe(opusEncodeStream).pipe(opusFile);
});

mp3File.pipe(mp3Decoder);

Throws this

events.js:85
      throw er; // Unhandled 'error' event
            ^
TypeError: Invalid non-string/buffer chunk

I guess that means I did that incorrectly.

var mp3File = fs.createReadStream('moon.mp3');
var opusFile = fs.createWriteStream('test.opus');

var mp3Decoder = new Lame.Decoder();
mp3Decoder.on('format', function(format) {
    var rate = 48000;
    var channels = 2;
    var frame_size = rate / 100;

    var opusEncoder = new Opus.OpusEncoder( rate );

    mp3Decoder.pipe(opusEncoder).pipe(opusFile);
});

mp3File.pipe(mp3Decoder);

Throws an undefined error

js:516
  dest.on('unpipe', onunpipe);
       ^
TypeError: undefined is not a function

I have tons of other failed examples, but I figure instead of posting them all, maybe someone who's done this can help me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.