Skip to content

npm install error

I get this error while running npm install:

/home/luca/.node-gyp/10.2.1/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:
../../nan/nan_object_wrap.h:66:61:   required from here
/home/luca/.node-gyp/10.2.1/include/node/v8.h:9238:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
In file included from ../src/database.h:12,
                 from ../src/database.cc:4:
../src/async.h: In instantiation of ‘Async<Item, Parent>::Async(Parent*, Async<Item, Parent>::Callback) [with Item = std::__cxx11::basic_string<char>; Parent = node_sqlite3::Database; Async<Item, Parent>::Callback = void (*)(node_sqlite3::Database*, std::__cxx11::basic_string<char>*)]’:
../src/database.cc:391:59:   required from here
../src/async.h:29:52: warning: cast between incompatible function types from ‘void (*)(uv_async_t*, int)’ {aka ‘void (*)(uv_async_s*, int)’} to ‘uv_async_cb’ {aka ‘void (*)(uv_async_s*)’} [-Wcast-function-type]
../src/async.h: In instantiation of ‘Async<Item, Parent>::Async(Parent*, Async<Item, Parent>::Callback) [with Item = node_sqlite3::Database::ProfileInfo; Parent = node_sqlite3::Database; Async<Item, Parent>::Callback = void (*)(node_sqlite3::Database*, node_sqlite3::Database::ProfileInfo*)]’:
../src/database.cc:429:65:   required from here
../src/async.h:29:52: warning: cast between incompatible function types from ‘void (*)(uv_async_t*, int)’ {aka ‘void (*)(uv_async_s*, int)’} to ‘uv_async_cb’ {aka ‘void (*)(uv_async_s*)’} [-Wcast-function-type]
../src/async.h: In instantiation of ‘Async<Item, Parent>::Async(Parent*, Async<Item, Parent>::Callback) [with Item = node_sqlite3::Database::UpdateInfo; Parent = node_sqlite3::Database; Async<Item, Parent>::Callback = void (*)(node_sqlite3::Database*, node_sqlite3::Database::UpdateInfo*)]’:
../src/database.cc:470:62:   required from here
../src/async.h:29:52: warning: cast between incompatible function types from ‘void (*)(uv_async_t*, int)’ {aka ‘void (*)(uv_async_s*, int)’} to ‘uv_async_cb’ {aka ‘void (*)(uv_async_s*)’} [-Wcast-function-type]
../src/database.cc: At global scope:
../src/database.cc:689:1: fatal error: opening dependency file ./Release/.deps/Release/obj.target/node_sqlite3/src/database.o.d.raw: No such file or directory
compilation terminated.
make: *** [node_sqlite3.target.mk:115: Release/obj.target/node_sqlite3/src/database.o] Error 1
make: Leaving directory '/mnt/hdd/matrix/matrix-recorder/node_modules/sqlite3/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/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 Linux 4.14.41-1-lts
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/mnt/hdd/matrix/matrix-recorder/node_modules/sqlite3/lib/binding/node-v64-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/mnt/hdd/matrix/matrix-recorder/node_modules/sqlite3/lib/binding/node-v64-linux-x64"
gyp ERR! cwd /mnt/hdd/matrix/matrix-recorder/node_modules/sqlite3
gyp ERR! node -v v10.2.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
$ node --version
v10.2.1
$ npm --version
6.1.0