Reputation: 67
I'm trying to download certain packages like node-portaudio and image-to-ascii but an error is occuring. While there are many other packages that are being downloaded wothout any errors. The error shown is :
> [email protected] install /home/ex-machina/Desktop/Project/node_modules/node-portaudio
> node-gyp rebuild
make: Entering directory '/home/ex-machina/Desktop/Project/node_modules/node-portaudio/build'
COPY ../build/Release/libportaudio.so.2
CXX(target) Release/obj.target/node_pa/src/node_pa.o
CXX(target) Release/obj.target/node_pa/src/GetDevices.o
CXX(target) Release/obj.target/node_pa/src/AudioIn.o
In file included from ../src/AudioIn.cc:20:0:
../src/Params.h: In member function ‘std::__cxx11::string streampunk::Params::unpackValue(v8::Local<v8::Value>)’:
../src/Params.h:41:48: warning: ‘v8::Local<v8::Value> v8::Object::Get(uint32_t)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
return *String::Utf8Value(valueArray->Get(0));
^
In file included from /home/ex-machina/.cache/node-gyp/12.17.0/include/node/v8-internal.h:14:0,
from /home/ex-machina/.cache/node-gyp/12.17.0/include/node/v8.h:27,
from /home/ex-machina/.cache/node-gyp/12.17.0/include/node/node.h:67,
from ../../nan/nan.h:56,
from ../src/AudioIn.cc:16:
/home/ex-machina/.cache/node-gyp/12.17.0/include/node/v8.h:3557:51: note:declared here
V8_DEPRECATED("Use maybe version", Local<Value> Get(uint32_t index));
^
/home/ex-machina/.cache/node-gyp/12.17.0/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
In file included from ../src/AudioIn.cc:20:0:
../src/Params.h:41:49: error: no matching function for call to ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’
return *String::Utf8Value(valueArray->Get(0));
^
In file included from /home/ex-machina/.cache/node-gyp/12.17.0/include/node/node.h:67:0,
from ../../nan/nan.h:56,
from ../src/AudioIn.cc:16:
/home/ex-machina/.cache/node-gyp/12.17.0/include/node/v8.h:3135:5: note: candidate: v8::String::Utf8Value::Utf8Value(v8::Isolate*, v8::Local<v8::Value>)
Utf8Value(Isolate* isolate, Local<v8::Value> obj);
^~~~~~~~~
/home/ex-machina/.cache/node-gyp/12.17.0/include/node/v8.h:3135:5: note: candidate expects 2 arguments, 1 provided
In file included from ../src/AudioIn.cc:20:0:
../src/Params.h: In member function ‘std::__cxx11::string streampunk::Params::unpackStr(v8::Local<v8::Object>, const string&, std::__cxx11::string)’:
../src/Params.h:64:38: error: no matching function for call to ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>&)’
result = *String::Utf8Value(val);
^
In file included from /home/ex-machina/.cache/node-gyp/12.17.0/include/node/node.h:67:0,
from ../../nan/nan.h:56,
from ../src/AudioIn.cc:16:
/home/ex-machina/.cache/node-gyp/12.17.0/include/node/v8.h:3135:5: note: candidate: v8::String::Utf8Value::Utf8Value(v8::Isolate*, v8::Local<v8::Value>)
Utf8Value(Isolate* isolate, Local<v8::Value> obj);
^~~~~~~~~
/home/ex-machina/.cache/node-gyp/12.17.0/include/node/v8.h:3135:5: note: candidate expects 2 arguments, 1 provided
node_pa.target.mk:128: recipe for target 'Release/obj.target/node_pa/src/AudioIn.o' failed
make: *** [Release/obj.target/node_pa/src/AudioIn.o] Error 1
make: Leaving directory '/home/ex-machina/Desktop/Project/node_modules/node-portaudio/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/ex-machina/.nvm/versions/node/v12.17.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 5.3.0-51-generic
gyp ERR! command "/home/ex-machina/.nvm/versions/node/v12.17.0/bin/node" "/home/ex-machina/.nvm/versions/node/v12.17.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ex-machina/Desktop/Project/node_modules/node-portaudio
gyp ERR! node -v v12.17.0
gyp ERR! node-gyp -v v5.1.0
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! /home/ex-machina/.npm/_logs/2020-06-06T18_22_49_191Z-debug.log
I dont understand what's wrong. This is happening to only few packages. I've tried adding sudo but it doesn't work. How to resolve this?
Upvotes: 0
Views: 169
Reputation: 11
This error could be because of Node JS Version installed on your machine. can you try updating the version or checking the version supported by that plugin
Upvotes: 1