I am trying to install arpjs module... when I try to install it with
npm install arpjs
or
npm install
sudo npm install https://github.com/skepticfx/arpjs.git
I always get this error:
npm WARN lifecycle typechecker#2.0.8~preinstall: cannot run in wd %s %s (wd=%s) typechecker#2.0.8 node ./cyclic.js /usr/lib/node_modules/.staging/typechecker-8e5299d6dc600530516e3f6be254ad7d
socketwatcher#0.2.1 install /usr/lib/node_modules/arpjs/node_modules/socketwatcher
node-gyp rebuild
make: Entering directory /usr/lib/node_modules/arpjs/node_modules/socketwatcher/build'
CXX(target) Release/obj.target/socketwatcher/socket_watcher.o
In file included from ../node_modules/nan/nan_new.h:190:0,
from ../node_modules/nan/nan.h:80,
from ../socket_watcher.hpp:8,
from ../socket_watcher.cpp:5:
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static NanIntern::FactoryBase<v8::Signature>::return_t
NanIntern::Factory<v8::Signature>::New(NanIntern::Factory<v8::Signature>::FTH, int, NanIntern::Factory<v8::Signature>::FTH*)’:
../node_modules/nan/nan_implementation_12_inl.h:181:76: error: no matching function for call to ‘v8::Signature::New(v8::Isolate*, NanIntern::Factory<v8::Signature>::FTH&, int&, NanIntern::Factory<v8::Signature>::FTH*&)’
return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
^
../node_modules/nan/nan_implementation_12_inl.h:181:76: note: candidate is:
In file included from /home/groshev/.node-gyp/5.0.0/include/node/node.h:42:0,
from ../node_modules/nan/nan.h:24,
from ../socket_watcher.hpp:8,
from ../socket_watcher.cpp:5:
/home/groshev/.node-gyp/5.0.0/include/node/v8.h:4674:27: note: static v8::Local<v8::Signature> v8::Signature::New(v8::Isolate*, v8::Local<v8::FunctionTemplate>)
static Local<Signature> New(
^
/home/groshev/.node-gyp/5.0.0/include/node/v8.h:4674:27: note: candidate expects 2 arguments, 4 provided
In file included from ../socket_watcher.hpp:8:0,
from ../socket_watcher.cpp:5:
../node_modules/nan/nan.h: At global scope:
../node_modules/nan/nan.h:171:25: error: redefinition of ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)’
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
^
../node_modules/nan/nan.h:166:25: error: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
^
../node_modules/nan/nan.h:564:13: error: ‘node::smalloc’ has not been declared
, node::smalloc::FreeCallback callback
^
../node_modules/nan/nan.h:564:35: error: expected ‘,’ or ‘...’ before ‘callback’
, node::smalloc::FreeCallback callback
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
../node_modules/nan/nan.h:568:50: error: ‘callback’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../node_modules/nan/nan.h:568:60: error: ‘hint’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../node_modules/nan/nan.h:575:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
../node_modules/nan/nan.h:575:67: note: candidates are:
In file included from ../node_modules/nan/nan.h:25:0,
from ../socket_watcher.hpp:8,
from ../socket_watcher.cpp:5:
/home/groshev/.node-gyp/5.0.0/include/node/node_buffer.h:31:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match>
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/home/groshev/.node-gyp/5.0.0/include/node/node_buffer.h:31:40: note: no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’
/home/groshev/.node-gyp/5.0.0/include/node/node_buffer.h:43:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match>
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/home/groshev/.node-gyp/5.0.0/include/node/node_buffer.h:43:40: note: no known conversion for argument 2 from ‘const char*’ to ‘char*’
In file included from ../socket_watcher.hpp:8:0,
from ../socket_watcher.cpp:5:
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../node_modules/nan/nan.h:579:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), size)’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
../node_modules/nan/nan.h:586:12: error: ‘Use’ is not a member of ‘node::Buffer’
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
^
make: *** [Release/obj.target/socketwatcher/socket_watcher.o] Error 1
make: Leaving directory/usr/lib/node_modules/arpjs/node_modules/socketwatcher/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:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.16.0-52-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/arpjs/node_modules/socketwatcher
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:socketwatcher#0.2.1 socketwatcher#0.2.1 install: node-gyp rebuild
npm WARN install:socketwatcher#0.2.1 Exit status 1
/usr/lib
└── (empty)
npm ERR! code 1
so i was thinking to manually download the sorurce form github and install it . But this module is dependent of other modules (ip,mac and pcap).
So how can i do that ?
This issue has been fixed with the latest release of arpjs (1.1.0). Try installing arpjs again using npm install arpjs
Related
I'm working on an old node project and while doing npm install I'm getting errors
Node version: v13.8.0
Npm version: 6.14.4
Mac OS Version: 10.15.5
At first, I was getting the X-Code issue that I have fixed after re-installing the X-Code.
The issue seems to be on npm page but no one has replied to it
https://npm.community/t/npm-install-failing-gyp-err-stack-error-make-failed-with-exit-code-2-and-npm-err-failed-at-the-fibers-1-0-15-install-script/8195/2
> fibers#2.0.2 install /Users/cksharma/projects/step-library/some-library/node_modules/fibers
> node build.js || nodejs build.js
CXX(target) Release/obj.target/fibers/src/fibers.o
../src/fibers.cc:68:2: error: no template named 'Handle'
Handle<String> NewLatin1String(Isolate* isolate, const char* string) {
^
../src/fibers.cc:69:10: error: no viable conversion from returned value of type 'Local<v8::String>' to function return type 'int'
return String::NewFromOneByte(isolate, (const uint8_t*)string, NewStringType::kNormal).ToLocalChecked();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/fibers.cc:72:2: error: no template named 'Handle'
Handle<String> NewLatin1Symbol(Isolate* isolate, const char* string) {
^
../src/fibers.cc:73:10: error: no viable conversion from returned value of type 'Local<v8::String>' to function return type 'int'
return String::NewFromOneByte(isolate, (const uint8_t*)string, NewStringType::kNormal).ToLocalChecked();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/fibers.cc:94:2: error: no template named 'Handle'
Handle<Object> NewInstance(Isolate* isolate, Local<Function> fn, int argc, Local<Value> argv[]) {
^
../src/fibers.cc:95:10: error: no viable conversion from returned value of type 'Local<v8::Object>' to function return type 'int'
return fn->NewInstance(isolate->GetCurrentContext(), argc, argv).ToLocalChecked();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/fibers.cc:104:2: error: no template named 'Handle'
Handle<Number> ToNumber(Local<Value> value) {
^
../src/fibers.cc:105:10: error: no viable conversion from returned value of type 'Local<v8::Number>' to function return type 'int'
return value->ToNumber(Isolate::GetCurrent()->GetCurrentContext()).ToLocalChecked();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/fibers.cc:126:58: error: no template named 'Handle'
void Reset(Isolate* isolate, Persistent<T>& persistent, Handle<T> handle) {
^
../src/fibers.cc:139:7: error: variable has incomplete type 'void'
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
../src/fibers.cc:139:26: error: use of undeclared identifier 'Handle'
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
../src/fibers.cc:139:33: error: 'T' does not refer to a value
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
../src/fibers.cc:138:18: note: declared here
template <class T>
^
../src/fibers.cc:139:36: error: use of undeclared identifier 'handle'
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
../src/fibers.cc:139:48: error: expected '(' for function-style cast or type construction
void SetInternalPointer(Handle<T> handle, int index, void* val) {
~~~ ^
../src/fibers.cc:139:59: error: expected '(' for function-style cast or type construction
void SetInternalPointer(Handle<T> handle, int index, void* val) {
~~~~^
../src/fibers.cc:139:61: error: use of undeclared identifier 'val'
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
../src/fibers.cc:139:65: error: expected ';' at end of declaration
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
;
../src/fibers.cc:139:66: error: expected unqualified-id
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
../src/fibers.cc:143:27: error: use of undeclared identifier 'Handle'
void* GetInternalPointer(Handle<T> handle, int index) {
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/fibers/src/fibers.o] 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:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:321:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.5.0
gyp ERR! command "/usr/local/Cellar/node/13.8.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /Users/cksharma/projects/step-library/step-library/node_modules/fibers
gyp ERR! node -v v13.8.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: `sudo apt-get install g++ build-essential`
Alpine users please run: `sudo apk add python make g++`
sh: nodejs: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! fibers#2.0.2 install: `node build.js || nodejs build.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the fibers#2.0.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I have tried checking node-fiber github page but didn't find anything useful.
I had this issue because "typescript" was a normal dependency instead of a devDependency, when I move "typescript" as devDependency it worked.
i want to install the package 'wdio-jasmine-framework' with the command 'npm i wdio-jasmine-framework --save-dev' but i get this error message. I already tried to delete the global 'node-gyp' package. I checked if my mac os is ready for it, with https://github.com/nodejs/node-gyp/blob/master/macOS_Catalina.md and also tried this here https://github.com/nodejs/node-gyp. Still doesn't work. Node version 13.0.1, npm version 6.12.0.
I just tried to go through this tutorial https://medium.com/the-web-tub/testing-cordova-apps-with-appium-2b3b236e026b
ps: i am new newbie in frontend
packag.json
"name": "APPNAME-mobile-integration-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "wdio tests/wdio.conf.js",
"appium": "appium",
"appium-doctor": "appium-doctor"
},
"keywords": [],
"author": "XXX XXX",
"license": "ISC",
"devDependencies": {
"appium": "^1.15.1",
"appium-doctor": "^1.12.1",
"core-js": "^3.3.6",
"wdio-appium-service": "^0.2.3",
"wdio-jasmine-framework": "^0.3.8",
"wdio-spec-reporter": "^0.1.5",
"webdriverio": "^5.15.6"
}
}
Error message
> node build.js || nodejs build.js
CXX(target) Release/obj.target/fibers/src/fibers.o
../src/fibers.cc:68:2: error: no template named 'Handle'
Handle<String> NewLatin1String(Isolate* isolate, const char* string) {
^
../src/fibers.cc:69:10: error: no viable conversion from returned value of type 'Local<v8::String>' to function return type 'int'
return String::NewFromOneByte(isolate, (const uint8_t*)string, NewStringType::kNormal).ToLocalChecked();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/fibers.cc:72:2: error: no template named 'Handle'
Handle<String> NewLatin1Symbol(Isolate* isolate, const char* string) {
^
../src/fibers.cc:73:10: error: no viable conversion from returned value of type 'Local<v8::String>' to function return type 'int'
return String::NewFromOneByte(isolate, (const uint8_t*)string, NewStringType::kNormal).ToLocalChecked();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/fibers.cc:94:2: error: no template named 'Handle'
Handle<Object> NewInstance(Isolate* isolate, Local<Function> fn, int argc, Local<Value> argv[]) {
^
../src/fibers.cc:95:10: error: no viable conversion from returned value of type 'Local<v8::Object>' to function return type 'int'
return fn->NewInstance(isolate->GetCurrentContext(), argc, argv).ToLocalChecked();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/fibers.cc:104:2: error: no template named 'Handle'
Handle<Number> ToNumber(Local<Value> value) {
^
../src/fibers.cc:105:10: error: no viable conversion from returned value of type 'Local<v8::Number>' to function return type 'int'
return value->ToNumber(Isolate::GetCurrent()->GetCurrentContext()).ToLocalChecked();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/fibers.cc:114:50: error: no template named 'Handle'
Local<Value> GetStackTrace(TryCatch* try_catch, Handle<Context> context) {
^
../src/fibers.cc:127:39: error: no template named 'Handle'
void fixStackLimit(Isolate* isolate, Handle<Context> context) {
^
../src/fibers.cc:149:58: error: no template named 'Handle'
void Reset(Isolate* isolate, Persistent<T>& persistent, Handle<T> handle) {
^
../src/fibers.cc:162:7: error: variable has incomplete type 'void'
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
../src/fibers.cc:162:26: error: use of undeclared identifier 'Handle'
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
../src/fibers.cc:162:33: error: 'T' does not refer to a value
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
../src/fibers.cc:161:18: note: declared here
template <class T>
^
../src/fibers.cc:162:36: error: use of undeclared identifier 'handle'
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
../src/fibers.cc:162:48: error: expected '(' for function-style cast or type construction
void SetInternalPointer(Handle<T> handle, int index, void* val) {
~~~ ^
../src/fibers.cc:162:59: error: expected '(' for function-style cast or type construction
void SetInternalPointer(Handle<T> handle, int index, void* val) {
~~~~^
../src/fibers.cc:162:61: error: use of undeclared identifier 'val'
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
../src/fibers.cc:162:65: error: expected ';' at end of declaration
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
;
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/fibers/src/fibers.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/XXX/.nvm/versions/node/v13.0.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 19.0.0
gyp ERR! command "/Users/XXX/.nvm/versions/node/v13.0.1/bin/node" "/Users/XXX/.nvm/versions/node/v13.0.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /Users/XXX/Documents/APPNAME/APP-mobile-integration-test/node_modules/wdio-sync/node_modules/fibers
gyp ERR! node -v v13.0.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: `sudo apt-get install g++ build-essential`
RHEL users please run: `yum install gcc-c++` and `yum groupinstall 'Development Tools'`
Alpine users please run: `sudo apk add python make g++`
sh: nodejs: command not found
npm WARN APP-mobile-integration-test#1.0.0 No description
npm WARN APP-mobile-integration-test#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! fibers#3.1.1 install: `node build.js || nodejs build.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the fibers#3.1.1 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/XXX/.npm/_logs/2019-11-01T11_40_02_099Z-debug.log```
try deleting your package-lock.json and re run npm install
SOLUTION
i dont understand this weird version, but i use now:
"wdio-jasmine-framework": "^5.0.0-beta.3"
I tried to install raw-socket [1.2.6] module in nodejs using the npm. When I am trying to install the module, got the following error..
Node version : 6.11.3
NPM version : 3.10.10
[test#test node_modules]$ npm install raw-socket2
> raw-socket2#1.2.6 install /home/test/node_modules/raw-socket2
> node-gyp rebuild
make: Entering directory `/home/test/node_modules/raw-socket2/build'
CXX(target) Release/obj.target/raw/src/raw.o
In file included from /home/test/.node-gyp/6.11.3/include/node/node.h:42,
from ../../nan/nan.h:24,
from ../src/raw.cc:4:
/home/test/.node-gyp/6.11.3/include/node/v8.h:345: error: expected unqualified-id before ‘using’
/home/test/.node-gyp/6.11.3/include/node/v8.h: In constructor ‘v8::MaybeLocal<T>::MaybeLocal()’:
/home/test/.node-gyp/6.11.3/include/node/v8.h:362: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h: In member function ‘bool v8::MaybeLocal<T>::IsEmpty() const’:
/home/test/.node-gyp/6.11.3/include/node/v8.h:369: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h: In member function ‘bool v8::MaybeLocal<T>::ToLocal(v8::Local<S>*) const’:
/home/test/.node-gyp/6.11.3/include/node/v8.h:373: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h: In member function ‘bool v8::WeakCallbackInfo<T>::IsFirstPass() const’:
/home/test/.node-gyp/6.11.3/include/node/v8.h:441: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h: At global scope:
/home/test/.node-gyp/6.11.3/include/node/v8.h:481: error: expected unqualified-id before ‘using’
/home/test/.node-gyp/6.11.3/include/node/v8.h: In constructor ‘v8::Global<T>::Global()’:
/home/test/.node-gyp/6.11.3/include/node/v8.h:820: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h: In constructor ‘v8::Global<T>::Global(v8::Global<T>&&)’:
/home/test/.node-gyp/6.11.3/include/node/v8.h:845: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h: In member function ‘v8::Global<T>& v8::Global<T>::operator=(v8::Global<S>&&)’:
/home/test/.node-gyp/6.11.3/include/node/v8.h:857: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h: At global scope:
/home/test/.node-gyp/6.11.3/include/node/v8.h:882: error: expected unqualified-id before ‘using’
/home/test/.node-gyp/6.11.3/include/node/v8.h:1119: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h:1125: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h: In member function ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const’:
/home/test/.node-gyp/6.11.3/include/node/v8.h:3279: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h: At global scope:
/home/test/.node-gyp/6.11.3/include/node/v8.h:4499: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h:4515: error: ‘nullptr’ was not declared in this scope
/home/test/.node-gyp/6.11.3/include/node/v8.h: In member function ‘v8::Local<T> v8::MaybeLocal<T>::ToLocalChecked()’:
/home/test/.node-gyp/6.11.3/include/node/v8.h:7544: error: ‘nullptr’ was not declared in this scope
In file included from ../../nan/nan.h:111,
from ../src/raw.cc:4:
../../nan/nan_new.h: At global scope:
../../nan/nan_new.h:24: error: template declaration of ‘v8::Local<T> Nan::imp::To’
../../nan/nan_new.h:24: error: ‘Handle’ is not a member of ‘v8’
../../nan/nan_new.h:24: error: expected primary-expression before ‘>’ token
../../nan/nan_new.h:24: error: ‘i’ was not declared in this scope
../../nan/nan_new.h:29: error: expected initializer before ‘<’ token
../../nan/nan_new.h:34: error: expected initializer before ‘<’ token
../../nan/nan_new.h:39: error: expected initializer before ‘<’ token
../../nan/nan_new.h:66: error: ‘v8::Handle’ has not been declared
../../nan/nan_new.h:66: error: expected ‘,’ or ‘...’ before ‘<’ token
../../nan/nan_new.h:65: error: default argument missing for parameter 2 of ‘static v8::Local<v8::Context> Nan::imp::Factory<v8::Context>::New(v8::ExtensionConfiguration*, int)’
../../nan/nan_new.h:85: error: ‘v8::Handle’ has not been declared
../../nan/nan_new.h:85: error: expected ‘,’ or ‘...’ before ‘<’ token
../../nan/nan_new.h:93: error: ‘v8::Handle’ has not been declared
../../nan/nan_new.h:93: error: expected ‘,’ or ‘...’ before ‘<’ token
../../nan/nan_new.h:92: error: default argument missing for parameter 2 of ‘static v8::Local<v8::FunctionTemplate> Nan::imp::Factory<v8::FunctionTemplate>::New(void (*)(const v8::FunctionCallbackInfo<v8::Value>&), int)’
../../nan/nan_new.h:139: error: ‘v8::Handle’ has not been declared
../../nan/nan_new.h:139: error: expected ‘,’ or ‘...’ before ‘<’ token
../../nan/nan_new.h:151: error: ISO C++ forbids declaration of ‘Handle’ with no type
../../nan/nan_new.h:151: error: typedef name may not be a nested-name-specifier
../../nan/nan_new.h:151: error: expected ‘;’ before ‘<’ token
../../nan/nan_new.h:152: error: ‘FTH’ has not been declared
../../nan/nan_new.h:152: error: ‘FTH’ was not declared in this scope
../../nan/nan_new.h:171: error: ‘v8::Handle’ has not been declared
../../nan/nan_new.h:171: error: expected ‘,’ or ‘...’ before ‘<’ token
In file included from ../../nan/nan_new.h:191,
from ../../nan/nan.h:111,
from ../src/raw.cc:4:
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::BooleanObject> Nan::imp::Factory<v8::BooleanObject>::New(bool)’:
../../nan/nan_implementation_12_inl.h:49: warning: ‘static v8::Local<v8::Value> v8::BooleanObject::New(bool)’ is deprecated (declared at /home/test/.node-gyp/6.11.3/include/node/v8.h:4009)
../../nan/nan_implementation_12_inl.h: At global scope:
../../nan/nan_implementation_12_inl.h:56: error: ‘v8::Handle’ has not been declared
../../nan/nan_implementation_12_inl.h:56: error: expected ‘,’ or ‘...’ before ‘<’ token
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::Context> Nan::imp::Factory<v8::Context>::New(v8::ExtensionConfiguration*, int)’:
../../nan/nan_implementation_12_inl.h:58: error: ‘tmpl’ was not declared in this scope
../../nan/nan_implementation_12_inl.h:58: error: ‘obj’ was not declared in this scope
../../nan/nan_implementation_12_inl.h: At global scope:
../../nan/nan_implementation_12_inl.h:79: error: ‘v8::Handle’ has not been declared
../../nan/nan_implementation_12_inl.h:79: error: expected ‘,’ or ‘...’ before ‘<’ token
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::Function> Nan::imp::Factory<v8::Function>::New(void (*)(const v8::FunctionCallbackInfo<v8::Value>&), int)’:
../../nan/nan_implementation_12_inl.h:82: error: ‘data’ was not declared in this scope
../../nan/nan_implementation_12_inl.h: At global scope:
../../nan/nan_implementation_12_inl.h:89: error: ‘v8::Handle’ has not been declared
../../nan/nan_implementation_12_inl.h:89: error: expected ‘,’ or ‘...’ before ‘<’ token
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::FunctionTemplate> Nan::imp::Factory<v8::FunctionTemplate>::New(void (*)(const v8::FunctionCallbackInfo<v8::Value>&), int)’:
../../nan/nan_implementation_12_inl.h:93: error: ‘data’ was not declared in this scope
../../nan/nan_implementation_12_inl.h:94: error: ‘signature’ was not declared in this scope
../../nan/nan_implementation_12_inl.h: In static member function ‘static typename Nan::imp::IntegerFactory<T>::return_t Nan::imp::IntegerFactory<T>::New(int32_t)’:
../../nan/nan_implementation_12_inl.h:117: error: ‘To’ was not declared in this scope
../../nan/nan_implementation_12_inl.h:117: error: expected primary-expression before ‘>’ token
../../nan/nan_implementation_12_inl.h: In static member function ‘static typename Nan::imp::IntegerFactory<T>::return_t Nan::imp::IntegerFactory<T>::New(uint32_t)’:
../../nan/nan_implementation_12_inl.h:123: error: ‘To’ was not declared in this scope
../../nan/nan_implementation_12_inl.h:123: error: expected primary-expression before ‘>’ token
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::Uint32> Nan::imp::Factory<v8::Uint32>::New(int32_t)’:
../../nan/nan_implementation_12_inl.h:128: error: ‘To’ was not declared in this scope
../../nan/nan_implementation_12_inl.h:128: error: expected primary-expression before ‘>’ token
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::Uint32> Nan::imp::Factory<v8::Uint32>::New(uint32_t)’:
../../nan/nan_implementation_12_inl.h:134: error: ‘To’ was not declared in this scope
../../nan/nan_implementation_12_inl.h:134: error: expected primary-expression before ‘>’ token
../../nan/nan_implementation_12_inl.h: At global scope:
../../nan/nan_implementation_12_inl.h:156: error: ‘v8::Local<v8::RegExp> Nan::imp::Factory<v8::RegExp>::New’ is not a static member of ‘struct Nan::imp::Factory<v8::RegExp>’
../../nan/nan_implementation_12_inl.h:156: error: ‘Handle’ is not a member of ‘v8’
../../nan/nan_implementation_12_inl.h:156: error: expected primary-expression before ‘>’ token
../../nan/nan_implementation_12_inl.h:156: error: ‘pattern’ was not declared in this scope
../../nan/nan_implementation_12_inl.h:157: error: expected primary-expression before ‘flags’
../../nan/nan_implementation_12_inl.h:157: error: expected ‘,’ or ‘;’ before ‘{’ token
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::Script> Nan::imp::Factory<v8::Script>::New(v8::Local<v8::String>)’:
../../nan/nan_implementation_12_inl.h:166: warning: ‘static v8::Local<v8::Script> v8::ScriptCompiler::Compile(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /home/test/.node-gyp/6.11.3/include/node/v8.h:1352)
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::Script> Nan::imp::Factory<v8::Script>::New(v8::Local<v8::String>, const v8::ScriptOrigin&)’:
../../nan/nan_implementation_12_inl.h:173: warning: ‘static v8::Local<v8::Script> v8::ScriptCompiler::Compile(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /home/test/.node-gyp/6.11.3/include/node/v8.h:1352)
../../nan/nan_implementation_12_inl.h: At global scope:
../../nan/nan_implementation_12_inl.h:179: error: ‘v8::Local<v8::Signature> Nan::imp::Factory<v8::Signature>::New’ is not a static member of ‘struct Nan::imp::Factory<v8::Signature>’
../../nan/nan_implementation_12_inl.h:179: error: ‘FTH’ is not a member of ‘Nan::imp::Factory<v8::Signature>’
../../nan/nan_implementation_12_inl.h:179: error: expected ‘,’ or ‘;’ before ‘{’ token
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::String> Nan::imp::Factory<v8::String>::New(const uint8_t*, int)’:
../../nan/nan_implementation_12_inl.h:206: warning: ‘static v8::Local<v8::String> v8::String::NewFromOneByte(v8::Isolate*, const uint8_t*, v8::String::NewStringType, int)’ is deprecated (declared at /home/test/.node-gyp/6.11.3/include/node/v8.h:2332)
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::String> Nan::imp::Factory<v8::String>::New(v8::String::ExternalStringResource*)’:
../../nan/nan_implementation_12_inl.h:217: warning: ‘static v8::Local<v8::String> v8::String::NewExternal(v8::Isolate*, v8::String::ExternalStringResource*)’ is deprecated (declared at /home/test/.node-gyp/6.11.3/include/node/v8.h:2371)
../../nan/nan_implementation_12_inl.h: At global scope:
../../nan/nan_implementation_12_inl.h:228: error: ‘v8::Local<v8::StringObject> Nan::imp::Factory<v8::StringObject>::New’ is not a static member of ‘struct Nan::imp::Factory<v8::StringObject>’
../../nan/nan_implementation_12_inl.h:228: error: ‘Handle’ is not a member of ‘v8’
../../nan/nan_implementation_12_inl.h:228: error: expected primary-expression before ‘>’ token
../../nan/nan_implementation_12_inl.h:228: error: ‘value’ was not declared in this scope
../../nan/nan_implementation_12_inl.h:228: error: expected ‘,’ or ‘;’ before ‘{’ token
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::UnboundScript> Nan::imp::Factory<v8::UnboundScript>::New(v8::Local<v8::String>)’:
../../nan/nan_implementation_12_inl.h:237: warning: ‘static v8::Local<v8::UnboundScript> v8::ScriptCompiler::CompileUnbound(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /home/test/.node-gyp/6.11.3/include/node/v8.h:1333)
../../nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::UnboundScript> Nan::imp::Factory<v8::UnboundScript>::New(v8::Local<v8::String>, const v8::ScriptOrigin&)’:
../../nan/nan_implementation_12_inl.h:244: warning: ‘static v8::Local<v8::UnboundScript> v8::ScriptCompiler::CompileUnbound(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions)’ is deprecated (declared at /home/test/.node-gyp/6.11.3/include/node/v8.h:1333)
../../nan/nan_implementation_12_inl.h: At global scope:
../../nan/nan_implementation_12_inl.h:253: error: ‘NanNew’ declared as an ‘inline’ variable
../../nan/nan_implementation_12_inl.h:253: error: template declaration of ‘v8::Local<T> NanNew’
../../nan/nan_implementation_12_inl.h:253: error: ‘Handle’ is not a member of ‘v8’
../../nan/nan_implementation_12_inl.h:253: error: expected primary-expression before ‘>’ token
../../nan/nan_implementation_12_inl.h:253: error: ‘h’ was not declared in this scope
.
.
.
../../nan/nan.h:2112: error: expected ‘,’ or ‘;’ before ‘{’ token
../../nan/nan.h:2109: warning: ‘_NanGetExternalParts’ defined but not used
make: *** [Release/obj.target/raw/src/raw.o] Error 1
make: Leaving directory `/home/test/node_modules/raw-socket2/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: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 Linux 2.6.32-642.el6.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/test/node_module`enter code here`s/raw-socket2
gyp ERR! node -v v6.11.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN watchdog#1.0.0 No repository field.
npm WARN watchdog#1.0.0 license should be a valid SPDX license expression
npm ERR! Linux 2.6.32-642.el6.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "raw-socket2"
npm ERR! node v6.11.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! raw-socket2#1.2.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the raw-socket2#1.2.6 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 raw-socket2 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 raw-socket2
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls raw-socket2
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/test/node_modules/npm-debug.log
We tried the same in different version of nodejs. But, work fine in the version0.10.36.
You're not installing raw-socket, you're installing raw-socket2, which is a fork of the former, but one that hasn't been maintained very well (and therefore doesn't install on more recent versions of Node.js).
The original raw-socket seems to work okay in Node 8 (although the compiler does emit various warnings during installation, but warnings aren't errors).
I'm trying to install "karma" and "grunt-karma" for a project and I end up with the following npm error. I'm running MacOS Sierra v10.12.4, XCode v8.3.2 with command line tools installed, node v7.9.0, node-gyp v3.5.0.
Before pasting this here I read all the SO topics about this and also some other ones on GitHub, but nothing worked.
> bufferutil#1.1.0 install /Users/cc/project/node_modules/bufferutil
> node-gyp rebuild
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
../node_modules/nan/nan_new.h:34:56: warning: 'ToInt32' is deprecated
[-Wdeprecated-declarations]
To<v8::Int32>(v8::Handle<v8::Integer> i) { return i->ToInt32(); }
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:9041:21: note: 'ToInt32'
has been explicitly marked deprecated here
Local<Int32> Value::ToInt32() const {
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
../node_modules/nan/nan_new.h:39:56: warning: 'ToUint32' is deprecated
[-Wdeprecated-declarations]
To<v8::Uint32>(v8::Handle<v8::Integer> i) { return i->ToUint32(); }
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:9035:22: note: 'ToUint32'
has been explicitly marked deprecated here
Local<Uint32> Value::ToUint32() const {
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:49:29: warning: 'New' is
deprecated [-Wdeprecated-declarations]
return v8::BooleanObject::New(value).As<v8::BooleanObject>();
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:4490:56: note: 'New' has
been explicitly marked deprecated here
V8_DEPRECATED("Pass an isolate", static Local<Value> New(bool value));
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:166:30: warning: 'Compile' is
deprecated [-Wdeprecated-declarations]
return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:1376:21: note: 'Compile'
has been explicitly marked deprecated here
Local<Script> Compile(Isolate* isolate, Source* source,
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:173:30: warning: 'Compile' is
deprecated [-Wdeprecated-declarations]
return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:1376:21: note: 'Compile'
has been explicitly marked deprecated here
Local<Script> Compile(Isolate* isolate, Source* source,
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:205:22: warning:
'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
return v8::String::NewFromOneByte(v8::Isolate::GetCurrent(), value,
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:2544:21: note:
'NewFromOneByte' has been explicitly marked deprecated here
Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:217:22: warning: 'NewExternal'
is deprecated [-Wdeprecated-declarations]
return v8::String::NewExternal(v8::Isolate::GetCurrent(), value);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:2582:38: note:
'NewExternal' has been explicitly marked deprecated here
Local<String> NewExternal(
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:237:30: warning:
'CompileUnbound' is deprecated [-Wdeprecated-declarations]
return v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:1356:45: note:
'CompileUnbound' has been explicitly marked deprecated here
Local<UnboundScript> CompileUnbound(
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:244:30: warning:
'CompileUnbound' is deprecated [-Wdeprecated-declarations]
return v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:1356:45: note:
'CompileUnbound' has been explicitly marked deprecated here
Local<UnboundScript> CompileUnbound(
^
In file included from ../src/bufferutil.cc:16:
../node_modules/nan/nan.h:261:25: error: redefinition of '_NanEnsureLocal'
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
^
../node_modules/nan/nan.h:256:25: note: previous definition is here
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
^
../node_modules/nan/nan.h:289:39: warning: 'IdleNotification' is deprecated
[-Wdeprecated-declarations]
return v8::Isolate::GetCurrent()->IdleNotification(idle_time_in_ms);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:6893:22: note:
'IdleNotification' has been explicitly marked deprecated here
bool IdleNotification(int idle_time_in_ms));
^
In file included from ../src/bufferutil.cc:16:
../node_modules/nan/nan.h:473:20: error: no type named 'GCEpilogueCallback' in
'v8::Isolate'
v8::Isolate::GCEpilogueCallback callback
~~~~~~~~~~~~~^
../node_modules/nan/nan.h:479:20: error: no type named 'GCEpilogueCallback' in
'v8::Isolate'
v8::Isolate::GCEpilogueCallback callback) {
~~~~~~~~~~~~~^
../node_modules/nan/nan.h:484:20: error: no type named 'GCPrologueCallback' in
'v8::Isolate'
v8::Isolate::GCPrologueCallback callback
~~~~~~~~~~~~~^
../node_modules/nan/nan.h:490:20: error: no type named 'GCPrologueCallback' in
'v8::Isolate'
v8::Isolate::GCPrologueCallback callback) {
~~~~~~~~~~~~~^
../node_modules/nan/nan.h:569:15: error: no type named 'WeakCallbackData' in
namespace 'v8'
const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> > &data) {
~~~~^
../node_modules/nan/nan.h:569:31: error: expected ')'
const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> > &data) {
^
../node_modules/nan/nan.h:568:41: note: to match this '('
static void _NanWeakCallbackDispatcher(
^
../node_modules/nan/nan.h:570:42: error: use of undeclared identifier 'data'
_NanWeakCallbackInfo<T, P> *info = data.GetParameter();
^
../node_modules/nan/nan.h:661:13: error: no member named 'smalloc' in namespace
'node'
, node::smalloc::FreeCallback callback
~~~~~~^
../node_modules/nan/nan.h:672:12: error: no matching function for call to 'New'
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^~~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/node_buffer.h:46:40: note:
candidate function not viable: 2nd argument ('const char *') would lose
const qualifier
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/Users/cc/.node-gyp/7.9.0/include/node/node_buffer.h:34:40: note:
candidate function not viable: no known conversion from 'const char *' to
'v8::Local<v8::String>' for 2nd argument
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/Users/cc/.node-gyp/7.9.0/include/node/node_buffer.h:31:40: note:
candidate function not viable: requires 2 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
^
/Users/cc/.node-gyp/7.9.0/include/node/node_buffer.h:39:40: note:
candidate function not viable: requires 5 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
In file included from ../src/bufferutil.cc:16:
../node_modules/nan/nan.h:676:12: error: no viable conversion from returned
value of type 'v8::MaybeLocal<v8::Object>' to function return type
'v8::Local<v8::Object>'
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:221:7: note: candidate
constructor (the implicit copy constructor) not viable: no known
conversion from 'v8::MaybeLocal<v8::Object>' to 'const
v8::Local<v8::Object> &' for 1st argument
class Local {
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:221:7: note: candidate
constructor (the implicit move constructor) not viable: no known
conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object> &&'
for 1st argument
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:225:13: note: candidate
template ignored: could not match 'Local' against 'MaybeLocal'
V8_INLINE Local(Local<S> that)
^
In file included from ../src/bufferutil.cc:16:
../node_modules/nan/nan.h:683:26: error: no member named 'Use' in namespace
'node::Buffer'
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
~~~~~~~~~~~~~~^
../node_modules/nan/nan.h:710:32: warning: 'Compile' is deprecated
[-Wdeprecated-declarations]
return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:1376:21: note: 'Compile'
has been explicitly marked deprecated here
Local<Script> Compile(Isolate* isolate, Source* source,
^
In file included from ../src/bufferutil.cc:16:
../node_modules/nan/nan.h:717:32: warning: 'Compile' is deprecated
[-Wdeprecated-declarations]
return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:1376:21: note: 'Compile'
has been explicitly marked deprecated here
Local<Script> Compile(Isolate* isolate, Source* source,
^
../src/bufferutil.cc:30:5: error: call to 'NODE_SET_METHOD' is ambiguous
NODE_SET_METHOD(t, "unmask", BufferUtil::Unmask);
^~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/node.h:266:25: note: expanded
from macro 'NODE_SET_METHOD'
#define NODE_SET_METHOD node::NODE_SET_METHOD
^~~~~~~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/node.h:241:13: note: candidate
function
inline void NODE_SET_METHOD(v8::Local<v8::Template> recv,
^
/Users/cc/.node-gyp/7.9.0/include/node/node.h:254:13: note: candidate
function
inline void NODE_SET_METHOD(v8::Local<v8::Object> recv,
^
../src/bufferutil.cc:31:5: error: call to 'NODE_SET_METHOD' is ambiguous
NODE_SET_METHOD(t, "mask", BufferUtil::Mask);
^~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/node.h:266:25: note: expanded
from macro 'NODE_SET_METHOD'
#define NODE_SET_METHOD node::NODE_SET_METHOD
^~~~~~~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/node.h:241:13: note: candidate
function
inline void NODE_SET_METHOD(v8::Local<v8::Template> recv,
^
/Users/cc/.node-gyp/7.9.0/include/node/node.h:254:13: note: candidate
function
inline void NODE_SET_METHOD(v8::Local<v8::Object> recv,
^
../src/bufferutil.cc:32:5: error: call to 'NODE_SET_METHOD' is ambiguous
NODE_SET_METHOD(t, "merge", BufferUtil::Merge);
^~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/node.h:266:25: note: expanded
from macro 'NODE_SET_METHOD'
#define NODE_SET_METHOD node::NODE_SET_METHOD
^~~~~~~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/node.h:241:13: note: candidate
function
inline void NODE_SET_METHOD(v8::Local<v8::Template> recv,
^
/Users/cc/.node-gyp/7.9.0/include/node/node.h:254:13: note: candidate
function
inline void NODE_SET_METHOD(v8::Local<v8::Object> recv,
^
In file included from ../src/bufferutil.cc:7:
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:232:5: error: assigning to
'v8::Primitive *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:191:37: note: expanded from
macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:414:12: note: in instantiation of function template
specialization 'v8::Local<v8::Primitive>::Local<v8::Value>' requested here
return NanEscapeScope(NanNew(v8::Undefined(v8::Isolate::GetCurrent())));
^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
^
In file included from ../src/bufferutil.cc:7:
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:232:5: error: assigning to
'v8::Boolean *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:191:37: note: expanded from
macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:424:12: note: in instantiation of function template
specialization 'v8::Local<v8::Boolean>::Local<v8::Value>' requested here
return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent())));
^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
^
In file included from ../src/bufferutil.cc:7:
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:232:5: error: assigning to
'v8::Function *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:191:37: note: expanded from
macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:1514:12: note: in instantiation of function template
specialization 'v8::Local<v8::Function>::Local<v8::Value>' requested here
return NanEscapeScope(NanNew(handle)->Get(kCallbackIndex)
^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
^
In file included from ../src/bufferutil.cc:7:
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:232:5: error: assigning to
'v8::Object *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:191:37: note: expanded from
macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:1632:12: note: in instantiation of function template
specialization 'v8::Local<v8::Object>::Local<v8::Value>' requested here
return NanEscapeScope(handle->Get(NanNew(key)).As<v8::Object>());
^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
^
12 warnings and 19 errors generated.
make: *** [Release/obj.target/bufferutil/src/bufferutil.o] 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:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:194:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.5.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/cc/project/node_modules/bufferutil
gyp ERR! node -v v7.9.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
Trying to install pg. Here's the full log:
$ npm install pg --save
npm WARN package.json hs-app#0.0.0 No description
npm WARN package.json hs-app#0.0.0 No repository field.
npm WARN package.json hs-app#0.0.0 No README data
npm http GET https://registry.npmjs.org/pg
npm http 304 https://registry.npmjs.org/pg
npm http GET https://registry.npmjs.org/generic-pool/2.0.3
npm http GET https://registry.npmjs.org/buffer-writer/1.0.0
npm http 304 https://registry.npmjs.org/generic-pool/2.0.3
npm http 304 https://registry.npmjs.org/buffer-writer/1.0.0
npm http GET https://registry.npmjs.org/cloned/0.0.1
npm http GET https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/cloned/0.0.1
npm http 304 https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/rmdir
npm http 304 https://registry.npmjs.org/rmdir
> pg#2.3.1 install /Users/David/Developer/hs-app/node_modules/pg
> node-gyp rebuild || (exit 0)
CXX(target) Release/obj.target/binding/src/binding.o
../src/binding.cc:49:51: warning: 'New' is deprecated [-Wdeprecated-declarations]
Local<FunctionTemplate> t = FunctionTemplate::New(New);
^
../src/binding.cc:54:19: error: use of undeclared identifier 'NODE_PSYMBOL'
emit_symbol = NODE_PSYMBOL("emit");
^
../src/binding.cc:55:23: error: use of undeclared identifier 'NODE_PSYMBOL'
severity_symbol = NODE_PSYMBOL("severity");
^
../src/binding.cc:56:19: error: use of undeclared identifier 'NODE_PSYMBOL'
code_symbol = NODE_PSYMBOL("code");
^
../src/binding.cc:57:21: error: use of undeclared identifier 'NODE_PSYMBOL'
detail_symbol = NODE_PSYMBOL("detail");
^
../src/binding.cc:58:19: error: use of undeclared identifier 'NODE_PSYMBOL'
hint_symbol = NODE_PSYMBOL("hint");
^
../src/binding.cc:59:23: error: use of undeclared identifier 'NODE_PSYMBOL'
position_symbol = NODE_PSYMBOL("position");
^
../src/binding.cc:60:31: error: use of undeclared identifier 'NODE_PSYMBOL'
internalPosition_symbol = NODE_PSYMBOL("internalPosition");
^
../src/binding.cc:61:28: error: use of undeclared identifier 'NODE_PSYMBOL'
internalQuery_symbol = NODE_PSYMBOL("internalQuery");
^
../src/binding.cc:62:20: error: use of undeclared identifier 'NODE_PSYMBOL'
where_symbol = NODE_PSYMBOL("where");
^
../src/binding.cc:63:19: error: use of undeclared identifier 'NODE_PSYMBOL'
file_symbol = NODE_PSYMBOL("file");
^
../src/binding.cc:64:19: error: use of undeclared identifier 'NODE_PSYMBOL'
line_symbol = NODE_PSYMBOL("line");
^
../src/binding.cc:65:22: error: use of undeclared identifier 'NODE_PSYMBOL'
routine_symbol = NODE_PSYMBOL("routine");
^
../src/binding.cc:66:19: error: use of undeclared identifier 'NODE_PSYMBOL'
name_symbol = NODE_PSYMBOL("name");
^
../src/binding.cc:67:20: error: use of undeclared identifier 'NODE_PSYMBOL'
value_symbol = NODE_PSYMBOL("value");
^
../src/binding.cc:68:19: error: use of undeclared identifier 'NODE_PSYMBOL'
type_symbol = NODE_PSYMBOL("dataTypeID");
^
../src/binding.cc:69:22: error: use of undeclared identifier 'NODE_PSYMBOL'
channel_symbol = NODE_PSYMBOL("channel");
^
../src/binding.cc:70:22: error: use of undeclared identifier 'NODE_PSYMBOL'
payload_symbol = NODE_PSYMBOL("payload");
^
../src/binding.cc:71:22: error: use of undeclared identifier 'NODE_PSYMBOL'
command_symbol = NODE_PSYMBOL("command");
^
../src/binding.cc:73:45: error: address of overloaded function 'Connect' does not match required type 'void (const v8::FunctionCallbackInfo<v8::Value> &)'
NODE_SET_PROTOTYPE_METHOD(t, "connect", Connect);
^~~~~~~
../src/binding.cc:447:8: note: candidate function has type mismatch at 1st parameter (expected 'const v8::FunctionCallbackInfo<v8::Value> &' but has 'const char *')
bool Connect(const char* conninfo)
^
../src/binding.cc:107:3: note: candidate function has type mismatch at 1st parameter (expected 'const v8::FunctionCallbackInfo<v8::Value> &' but has 'const v8::Arguments &')
Connect(const Arguments& args)
^
/Users/David/.node-gyp/0.11.4/src/node.h:152:60: note: passing argument to parameter 'callback' here
v8::FunctionCallback callback) {
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make: *** [Release/obj.target/binding/src/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/David/.nvm/v0.11.4/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:103:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Darwin 12.4.0
gyp ERR! command "node" "/Users/David/.nvm/v0.11.4/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/David/Developer/hs-app/node_modules/pg
gyp ERR! node -v v0.11.4
gyp ERR! node-gyp -v v0.10.9
gyp ERR! not ok
pg#2.3.1 node_modules/pg
├── generic-pool#2.0.3
└── buffer-writer#1.0.0 (async#0.2.9, cloned#0.0.1)
The maintainer of node-postgres, Brian C, answered the following in the issue I had opened on github:
The native bindings wont compile on v.0.11.x yet. Every minor version for the past 4 they've substantially changed the C/C++ layer and the native bindings always break. I'm not going to go through the effort of fixing them until closer to the v0.12.0 release because the code is still in flux on node's end and will break again.
Good news, you're not hosed:
use the non-native bindings (require('pg')) which install even if the compilation fails
use node v0.10.x