Skip to content

Instantly share code, notes, and snippets.

@darknoon
Created April 25, 2019 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darknoon/305a16a91777f30159bcef759d5aeb77 to your computer and use it in GitHub Desktop.
Save darknoon/305a16a91777f30159bcef759d5aeb77 to your computer and use it in GitHub Desktop.
Error attempting to install python.js
~/Developer/ML/js-ecosystem/modules/test-pythonjs (master #) $ yarn add python.js
yarn add v1.15.2
info No lockfile found.
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
error /Users/andrew/Developer/ML/js-ecosystem/modules/test-pythonjs/node_modules/python.js: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/andrew/Developer/ML/js-ecosystem/modules/test-pythonjs/node_modules/python.js
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@11.12.0 | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [ '/usr/local/Cellar/node/11.12.0/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/andrew/Developer/ML/js-ecosystem/modules/test-pythonjs/node_modules/python.js/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/Cellar/node/11.12.0/libexec/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/andrew/.node-gyp/11.12.0/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/andrew/.node-gyp/11.12.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/Cellar/node/11.12.0/libexec/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/andrew/.node-gyp/11.12.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/andrew/Developer/ML/js-ecosystem/modules/test-pythonjs/node_modules/python.js',
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 make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/binding/src/binding.o
../src/binding.cc:23:54: warning: 'ToString' is deprecated: Use maybe version [-Wdeprecated-declarations]
String::Utf8Value js_module_name_string(args[0]->ToString());
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:2548:10: note: 'ToString' has been explicitly marked deprecated here
inline V8_DEPRECATED("Use maybe version", Local<String> ToString() const);
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/binding.cc:23:23: warning: 'Utf8Value' is deprecated: Use Isolate version [-Wdeprecated-declarations]
String::Utf8Value js_module_name_string(args[0]->ToString());
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:2991:5: note: 'Utf8Value' has been explicitly marked deprecated here
V8_DEPRECATED("Use Isolate version",
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
2 warnings generated.
CXX(target) Release/obj.target/binding/src/utils.o
../src/utils.cc:130:59: warning: 'ToObject' is deprecated: Use maybe version [-Wdeprecated-declarations]
Local<Object> js_exception_object = js_exception->ToObject();
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:2549:10: note: 'ToObject' has been explicitly marked deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/utils.cc:132:27: warning: 'Utf8Value' is deprecated: Use Isolate version [-Wdeprecated-declarations]
String::Utf8Value js_exception_name_string(js_exception_object->Get(String::NewFromUtf8(Isolate::GetCurrent(), "name")));
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:2991:5: note: 'Utf8Value' has been explicitly marked deprecated here
V8_DEPRECATED("Use Isolate version",
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/utils.cc:149:59: warning: 'ToString' is deprecated: Use maybe version [-Wdeprecated-declarations]
Local<String> js_exception_string = js_exception->ToString();
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:2548:10: note: 'ToString' has been explicitly marked deprecated here
inline V8_DEPRECATED("Use maybe version", Local<String> ToString() const);
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/utils.cc:156:23: warning: 'Utf8Value' is deprecated: Use Isolate version [-Wdeprecated-declarations]
String::Utf8Value js_message_string(js_message);
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:2991:5: note: 'Utf8Value' has been explicitly marked deprecated here
V8_DEPRECATED("Use Isolate version",
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
4 warnings generated.
CXX(target) Release/obj.target/binding/src/py_object_wrapper.o
../src/py_object_wrapper.cc:26:24: error: no member named 'SetNamedPropertyHandler' in 'v8::ObjectTemplate'
instance_template->SetNamedPropertyHandler(NamedGetter, NamedSetter, NULL, NULL, Enumerator);
~~~~~~~~~~~~~~~~~ ^
../src/py_object_wrapper.cc:54:41: warning: 'Int32Value' is deprecated: Use maybe version [-Wdeprecated-declarations]
return PyInt_FromLong(js_value->Int32Value());
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:2572:3: note: 'Int32Value' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/py_object_wrapper.cc:56:41: warning: 'Uint32Value' is deprecated: Use maybe version [-Wdeprecated-declarations]
return PyInt_FromLong(js_value->Uint32Value());
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:2571:3: note: 'Uint32Value' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/py_object_wrapper.cc:58:45: warning: 'NumberValue' is deprecated: Use maybe version [-Wdeprecated-declarations]
return PyFloat_FromDouble(js_value->NumberValue());
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:2569:3: note: 'NumberValue' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version", double NumberValue() const);
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/py_object_wrapper.cc:60:42: warning: 'BooleanValue' is deprecated: Use maybe version [-Wdeprecated-declarations]
return PyBool_FromLong(js_value->BooleanValue());
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:2568:3: note: 'BooleanValue' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version", bool BooleanValue() const);
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/py_object_wrapper.cc:62:53: warning: 'ToString' is deprecated: Use maybe version [-Wdeprecated-declarations]
String::Utf8Value js_value_string(js_value->ToString());
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:2548:10: note: 'ToString' has been explicitly marked deprecated here
inline V8_DEPRECATED("Use maybe version", Local<String> ToString() const);
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/py_object_wrapper.cc:62:27: warning: 'Utf8Value' is deprecated: Use Isolate version [-Wdeprecated-declarations]
String::Utf8Value js_value_string(js_value->ToString());
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:2991:5: note: 'Utf8Value' has been explicitly marked deprecated here
V8_DEPRECATED("Use Isolate version",
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/py_object_wrapper.cc:77:76: warning: 'ToString' is deprecated: Use maybe version [-Wdeprecated-declarations]
String::Utf8Value js_function_name_string(_js_function->GetName()->ToString());
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:2548:10: note: 'ToString' has been explicitly marked deprecated here
inline V8_DEPRECATED("Use maybe version", Local<String> ToString() const);
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/py_object_wrapper.cc:77:27: warning: 'Utf8Value' is deprecated: Use Isolate version [-Wdeprecated-declarations]
String::Utf8Value js_function_name_string(_js_function->GetName()->ToString());
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:2991:5: note: 'Utf8Value' has been explicitly marked deprecated here
V8_DEPRECATED("Use Isolate version",
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/py_object_wrapper.cc:96:45: warning: 'ToObject' is deprecated: Use maybe version [-Wdeprecated-declarations]
Local<Object> js_object = js_value->ToObject();
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:2549:10: note: 'ToObject' has been explicitly marked deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/py_object_wrapper.cc:135:52: warning: 'ToString' is deprecated: Use maybe version [-Wdeprecated-declarations]
js_function->SetName(js_function_name->ToString());
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:2548:10: note: 'ToString' has been explicitly marked deprecated here
inline V8_DEPRECATED("Use maybe version", Local<String> ToString() const);
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/py_object_wrapper.cc:143:29: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
PyObject* py_keys = PyMapping_Keys(py_object);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/abstract.h:1332:49: note: expanded from macro 'PyMapping_Keys'
#define PyMapping_Keys(O) PyObject_CallMethod(O,"keys",NULL)
^
../src/py_object_wrapper.cc:144:31: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
PyObject* py_values = PyMapping_Values(py_object);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/abstract.h:1342:51: note: expanded from macro 'PyMapping_Values'
#define PyMapping_Values(O) PyObject_CallMethod(O,"values",NULL)
^
../src/py_object_wrapper.cc:299:73: error: no matching member function for call to 'NewInstance'
Local<Object> js_object = _py_function_template->GetFunction()->NewInstance();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:4108:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:4105:44: note: candidate function not viable: requires 3 arguments, but 0 were provided
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
^
../src/py_object_wrapper.cc:378:81: warning: 'ToObject' is deprecated: Use maybe version [-Wdeprecated-declarations]
py_object_wrapper = ObjectWrap::Unwrap<PyObjectWrapper>(js_args.Data()->ToObject());
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:2549:10: note: 'ToObject' has been explicitly marked deprecated here
inline V8_DEPRECATED("Use maybe version", Local<Object> ToObject() const);
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/py_object_wrapper.cc:408:23: warning: 'Utf8Value' is deprecated: Use Isolate version [-Wdeprecated-declarations]
String::Utf8Value key(js_key);
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:2991:5: note: 'Utf8Value' has been explicitly marked deprecated here
V8_DEPRECATED("Use Isolate version",
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/py_object_wrapper.cc:421:23: warning: 'Utf8Value' is deprecated: Use Isolate version [-Wdeprecated-declarations]
String::Utf8Value key(js_key);
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:2991:5: note: 'Utf8Value' has been explicitly marked deprecated here
V8_DEPRECATED("Use Isolate version",
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/py_object_wrapper.cc:483:42: warning: 'ToBoolean' is deprecated: Use maybe version [-Wdeprecated-declarations]
if (!js_async.IsEmpty() && js_async->ToBoolean()->Value()) {
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:2546:10: note: 'ToBoolean' has been explicitly marked deprecated here
inline V8_DEPRECATED("Use maybe version",
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
../src/py_object_wrapper.cc:577:14: error: no matching constructor for initialization of 'v8::TryCatch'
TryCatch js_try_catch;
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:8824:12: note: candidate constructor not viable: requires single argument 'isolate', but no arguments were provided
explicit TryCatch(Isolate* isolate);
^
/Users/andrew/.node-gyp/11.12.0/include/node/v8.h:8943:3: note: candidate constructor not viable: requires 1 argument, but 0 were provided
TryCatch(const TryCatch&) = delete;
^
16 warnings and 3 errors generated.
make: *** [Release/obj.target/binding/src/py_object_wrapper.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/11.12.0/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:197:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Darwin 18.5.0
gyp ERR! command "/usr/local/Cellar/node/11.12.0/bin/node" "/usr/local/Cellar/node/11.12.0/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/andrew/Developer/ML/js-ecosystem/modules/test-pythonjs/node_modules/python.js
gyp ERR! node -v v11.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment