justinlatimer / node-midi

A node.js wrapper for RtMidi providing MIDI I/O
MIT License
745 stars 119 forks source link

Error when npm install midi (I don't see as much details when yarn add midi) #182

Closed Luxcium closed 3 years ago

Luxcium commented 4 years ago
npm install midi         

> midi@1.0.0 install /tmp/my-app2/node_modules/midi
> node-gyp rebuild

make : on entre dans le répertoire « /tmp/my-app2/node_modules/midi/build »
  CXX(target) Release/obj.target/midi/src/lib/RtMidi/RtMidi.o
  CXX(target) Release/obj.target/midi/src/input.o
  CXX(target) Release/obj.target/midi/src/output.o
  CXX(target) Release/obj.target/midi/src/midi.o
Dans le fichier inclus depuis ../../nan/nan.h:56,
                 depuis ../src/midi.cpp:1:
/home/luxcium/.cache/node-gyp/14.8.0/include/node/node.h:746:7: attention: transtypage entre types de fonctions incompatibles de « void (*)(v8::Local<v8::Object>) » vers « node::addon_register_func » {aka « void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*) »} [-Wcast-function-type]
  746 |       (node::addon_register_func) (regfunc),                          \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/luxcium/.cache/node-gyp/14.8.0/include/node/node.h:780:3: note: dans l'expansion de la macro « NODE_MODULE_X »
  780 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
      |   ^~~~~~~~~~~~~
../src/midi.cpp:15:5: note: dans l'expansion de la macro « NODE_MODULE »
   15 |     NODE_MODULE(midi, init)
      |     ^~~~~~~~~~~
  SOLINK_MODULE(target) Release/obj.target/midi.node
  COPY Release/midi.node
make : on quitte le répertoire « /tmp/my-app2/node_modules/midi/build »
npm WARN my-app2@1.0.0 No description
npm WARN my-app2@1.0.0 No repository field.

+ midi@1.0.0
added 4 packages from 14 contributors and audited 4 packages in 1.296s
found 0 vulnerabilities

Linux 5.8.14-200.fc32.x86_64 #1 SMP Wed Oct 7 14:47:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Screenshot_20201015_195355

Screenshot_20201015_195450

Screenshot_20201015_195541

Screenshot_20201015_200024

Luxcium commented 4 years ago

oups in english could be usefull probably:

env LANG=en_US npm install midi                                          

> midi@1.0.0 install /tmp/my-app2/node_modules/midi
> node-gyp rebuild

make: Entering directory '/tmp/my-app2/node_modules/midi/build'
  CXX(target) Release/obj.target/midi/src/lib/RtMidi/RtMidi.o
  CXX(target) Release/obj.target/midi/src/input.o
  CXX(target) Release/obj.target/midi/src/output.o
  CXX(target) Release/obj.target/midi/src/midi.o
In file included from ../../nan/nan.h:56,
                 from ../src/midi.cpp:1:
/home/luxcium/.cache/node-gyp/14.8.0/include/node/node.h:746:7: warning: cast between incompatible function types from 'void (*)(v8::Local<v8::Object>)' to 'node::addon_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)'} [-Wcast-function-type]
  746 |       (node::addon_register_func) (regfunc),                          \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/luxcium/.cache/node-gyp/14.8.0/include/node/node.h:780:3: note: in expansion of macro 'NODE_MODULE_X'
  780 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
      |   ^~~~~~~~~~~~~
../src/midi.cpp:15:5: note: in expansion of macro 'NODE_MODULE'
   15 |     NODE_MODULE(midi, init)
      |     ^~~~~~~~~~~
  SOLINK_MODULE(target) Release/obj.target/midi.node
  COPY Release/midi.node
make: Leaving directory '/tmp/my-app2/node_modules/midi/build'
npm WARN my-app2@1.0.0 No description
npm WARN my-app2@1.0.0 No repository field.

+ midi@1.0.0
updated 1 package and audited 4 packages in 3.935s
found 0 vulnerabilities
Luxcium commented 4 years ago
Luxcium commented 4 years ago

after:

> midi@1.0.0 install /home/luxcium/.local/src/node-midi
> node-gyp rebuild

make : on entre dans le répertoire « /home/luxcium/.local/src/node-midi/build »
  CXX(target) Release/obj.target/midi/src/lib/RtMidi/RtMidi.o
  CXX(target) Release/obj.target/midi/src/input.o
Dans le fichier inclus depuis ../src/input.cpp:1:
../node_modules/nan/nan.h: Dans la fonction « void Nan::AsyncQueueWorker(Nan::AsyncWorker*) »:
../node_modules/nan/nan.h:2298:7: attention: transtypage entre types de fonctions incompatibles de « void (*)(uv_work_t*) » {aka « void (*)(uv_work_s*) »} vers « uv_after_work_cb » {aka « void (*)(uv_work_s*, int) »} [-Wcast-function-type]
 2298 |     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CXX(target) Release/obj.target/midi/src/output.o
Dans le fichier inclus depuis ../src/output.cpp:1:
../node_modules/nan/nan.h: Dans la fonction « void Nan::AsyncQueueWorker(Nan::AsyncWorker*) »:
../node_modules/nan/nan.h:2298:7: attention: transtypage entre types de fonctions incompatibles de « void (*)(uv_work_t*) » {aka « void (*)(uv_work_s*) »} vers « uv_after_work_cb » {aka « void (*)(uv_work_s*, int) »} [-Wcast-function-type]
 2298 |     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CXX(target) Release/obj.target/midi/src/midi.o
Dans le fichier inclus depuis ../src/midi.cpp:1:
../node_modules/nan/nan.h: Dans la fonction « void Nan::AsyncQueueWorker(Nan::AsyncWorker*) »:
../node_modules/nan/nan.h:2298:7: attention: transtypage entre types de fonctions incompatibles de « void (*)(uv_work_t*) » {aka « void (*)(uv_work_s*) »} vers « uv_after_work_cb » {aka « void (*)(uv_work_s*, int) »} [-Wcast-function-type]
 2298 |     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dans le fichier inclus depuis ../node_modules/nan/nan.h:54,
                 depuis ../src/midi.cpp:1:
../src/midi.cpp: Au niveau global:
/home/luxcium/.cache/node-gyp/14.8.0/include/node/node.h:746:7: attention: transtypage entre types de fonctions incompatibles de « void (*)(v8::Local<v8::Object>) » vers « node::addon_register_func » {aka « void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*) »} [-Wcast-function-type]
  746 |       (node::addon_register_func) (regfunc),                          \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/luxcium/.cache/node-gyp/14.8.0/include/node/node.h:780:3: note: dans l'expansion de la macro « NODE_MODULE_X »
  780 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
      |   ^~~~~~~~~~~~~
../src/midi.cpp:15:5: note: dans l'expansion de la macro « NODE_MODULE »
   15 |     NODE_MODULE(midi, init)
      |     ^~~~~~~~~~~
  SOLINK_MODULE(target) Release/obj.target/midi.node
  COPY Release/midi.node
make : on quitte le répertoire « /home/luxcium/.local/src/node-midi/build »
added 124 packages from 524 contributors and audited 124 packages in 3.794s
found 5 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
> midi@1.0.0 test /home/luxcium/.local/src/node-midi
> mocha test/unit/*.js && node test/virtual-loopback-test-automated.js

  midi.Input
    ✓ should raise when not called with new
    ✓ should be an emitter
    .getPortCount
      ✓ .getPortCoun should return an integer
    .getPortName
      ✓ requires an argument
      ✓ requires an integer

MidiInAlsa::getPortName: error looking for port name!

      ✓ returns an empty string for unknown port
    .openPort
      ✓ requires an argument
      ✓ requires an integer
      ✓ requires a valid port
    .openVirtualPort
      ✓ requires an argument
      ✓ requires a string

  midi.Output
    ✓ should raise when not called with new
    ✓ should not be an emitter
    .getPortCount
      ✓ should return an integer
    .getPortName
      ✓ requires an argument
      ✓ requires an integer

MidiOutAlsa::getPortName: error looking for port name!

      ✓ returns an empty string for unknown port
    .openPort
      ✓ requires an argument
      ✓ requires an integer
      ✓ requires a valid port
    .openVirtualPort
      ✓ requires an argument
      ✓ requires a string
    .closePort
      ✓ allows you to close a port that was not opened

  23 passing (9ms)

Enumerating inputs
Input found: Midi Through:Midi Through Port-0 14:0
Input found: Komplete Audio 6:Komplete Audio 6 MIDI 1 32:0
Input found: Client-128:Virtual RawMIDI 128:0
Input found: RtMidi Output Client:node-midi Virtual Output 131:0
Enumerating outputs
Output found: Midi Through:Midi Through Port-0 14:0
Output found: Komplete Audio 6:Komplete Audio 6 MIDI 1 32:0
Output found: Client-128:Virtual RawMIDI 128:0
Output found: RtMidi Output Client:node-midi Virtual Output 131:0
Sending message
Sending message
Sending message
Sending message
Sending message
Sending message
Sending message
Sending message
Sending message
Luxcium commented 4 years ago

npm audit

                   === npm audit security report ===                        

Run npm install --save-dev mocha@8.1.3 to resolve 3 vulnerabilities

SEMVER WARNING: Recommended action is a potentially breaking change Low Prototype Pollution
Package minimist
Dependency of mocha [dev]
Path mocha > mkdirp > minimist
More info https://npmjs.com/advisories/1179
Low Prototype Pollution
Package yargs-parser
Dependency of mocha [dev]
Path mocha > yargs-parser
More info https://npmjs.com/advisories/1500
Low Prototype Pollution
Package yargs-parser
Dependency of mocha [dev]
Path mocha > yargs-unparser > yargs > yargs-parser
More info https://npmjs.com/advisories/1500

Run npm update yargs-parser --depth 3 to resolve 1 vulnerability

Low Prototype Pollution
Package yargs-parser
Dependency of mocha [dev]
Path mocha > yargs > yargs-parser
More info https://npmjs.com/advisories/1500

Run npm update lodash --depth 3 to resolve 1 vulnerability

Low Prototype Pollution
Package lodash
Dependency of mocha [dev]
Path mocha > yargs-unparser > lodash
More info https://npmjs.com/advisories/1523

found 5 low severity vulnerabilities in 124 scanned packages run npm audit fix to fix 2 of them. 3 vulnerabilities require semver-major dependency updates.

justinlatimer commented 3 years ago

Salut! Thanks for the detailed output. Looks like there are some warnings on compilation and security vulnerabilities in the devDependencies. I've published an update today which updates the required dependencies. Thanks!