Open btakita opened 5 years ago
on OSX, all up to date, node 12.3.1, npm install failed on the build process for libpq. The error messages are a little but different, don't know if that is the same issue as the previous one
libpq@1.8.8 install /Users/nicolas/flServer/node_modules/libpq node-gyp rebuild
CXX(target) Release/obj.target/addon/src/connection.o ../src/connection.cc:204:52: error: too few arguments to function call, single argument 'context' was not specified char* colName = PQfname(res, info[0]->Int32Value());
/Users/nicolas/.node-gyp/12.3.1/include/node/v8.h:2569:3: note: 'Int32Value' declared here
V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
^
/Users/nicolas/.node-gyp/12.3.1/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
^
../src/connection.cc:219:50: error: too few arguments to function call, single argument 'context' was not specified
int colName = PQftype(res, info[0]->Int32Value());
~~~~~~~~~~~~~~~~~~~ ^
/Users/nicolas/.node-gyp/12.3.1/include/node/v8.h:2569:3: note: 'Int32Value' declared here
V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
^
/Users/nicolas/.node-gyp/12.3.1/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
^
../src/connection.cc:230:39: error: too few arguments to function call, single argument 'context' was not specified
int rowNumber = info[0]->Int32Value();
~~~~~~~~~~~~~~~~~~~ ^
/Users/nicolas/.node-gyp/12.3.1/include/node/v8.h:2569:3: note: 'Int32Value' declared here
V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
^
/Users/nicolas/.node-gyp/12.3.1/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
^
../src/connection.cc:231:39: error: too few arguments to function call, single argument 'context' was not specified
int colNumber = info[1]->Int32Value();
~~~~~~~~~~~~~~~~~~~ ^
/Users/nicolas/.node-gyp/12.3.1/include/node/v8.h:2569:3: note: 'Int32Value' declared here
V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
^
/Users/nicolas/.node-gyp/12.3.1/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
^
../src/connection.cc:248:39: error: too few arguments to function call, single argument 'context' was not specified
int rowNumber = info[0]->Int32Value();
~~~~~~~~~~~~~~~~~~~ ^
/Users/nicolas/.node-gyp/12.3.1/include/node/v8.h:2569:3: note: 'Int32Value' declared here
V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
^
/Users/nicolas/.node-gyp/12.3.1/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
^
../src/connection.cc:249:39: error: too few arguments to function call, single argument 'context' was not specified
int colNumber = info[1]->Int32Value();
~~~~~~~~~~~~~~~~~~~ ^
/Users/nicolas/.node-gyp/12.3.1/include/node/v8.h:2569:3: note: 'Int32Value' declared here
V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
^
/Users/nicolas/.node-gyp/12.3.1/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
^
../src/connection.cc:754:29: error: too few arguments to function call, single argument 'isolate' was not specified
int len = str->Utf8Length() + 1;
~~~~~~~~~~~~~~~ ^
/Users/nicolas/.node-gyp/12.3.1/include/node/v8.h:2678:3: note: 'Utf8Length' declared here
int Utf8Length(Isolate* isolate) const;
^
../src/connection.cc:756:18: error: cannot initialize a parameter of type 'v8::Isolate *' with an lvalue of type 'char *'
str->WriteUtf8(buffer, len);
^~~~~~
/Users/nicolas/.node-gyp/12.3.1/include/node/v8.h:2738:26: note: passing argument to parameter 'isolate' here
int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
^
../src/connection.cc:804:8: warning: 'MakeCallback' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(handle(), emit_f, 1, info);
^
../../nan/nan.h:959:3: note: 'MakeCallback' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
^
../../nan/nan.h:103:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
1 warning and 8 errors generated.
make: *** [Release/obj.target/addon/src/connection.o] Error 1
This is still an issue on Node 12.14 as of today.
Reproduced on MacOS and the node:12-slim
Docker image.
I got this error on MacOS when upgrade from node 10. Deleting package-lock.json
and node_modules
and doing a clean npm install
resolved it.
This was with: libpq@1.8.9 Node 12.16.1 MacOS 10.15.2
I still have this issue.
Reproduced on MacOs and node:12.22.8-alpine