Could not build ... any suggestions?
~/src/postbird (master) $ yarn
yarn install v1.16.0
[1/4] ๐ Resolving packages...
[2/4] ๐ Fetching packages...
[3/4] ๐ Linking dependencies...
[4/4] ๐จ Building fresh packages...
[-/4] โก waiting...
[2/4] โก node-sass
[-/4] โก waiting...
warning Error running install script for optional dependency: "/Users/sean/src/postbird/node_modules/libpq: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/sean/src/postbird/node_modules/libpq
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args '/usr/local/Cellar/node/12.3.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/sean/src/postbird/node_modules/libpq/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/Cellar/node/12.3.1/libexec/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/sean/.node-gyp/12.3.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/sean/.node-gyp/12.3.1',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/Cellar/node/12.3.1/libexec/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/sean/.node-gyp/12.3.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/sean/src/postbird/node_modules/libpq',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
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/sean/.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/sean/.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/sean/.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/sean/.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/sean/.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/sean/.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/sean/.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/sean/.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/sean/.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/sean/.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/sean/.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/sean/.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/sean/.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/sean/.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
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/Cellar/node/12.3.1/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:200:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command \"/usr/local/Cellar/node/12.3.1/bin/node\" \"/usr/local/Cellar/node/12.3.1/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
gyp ERR! cwd /Users/sean/src/postbird/node_modules/libpq
gyp ERR! node -v v12.3.1
โจ Done in 6.63s.