Skip to content

Compile errors / Can't install package #113

@bitnom

Description

@bitnom

package.json:

{
  "name": "pretty-calculator",
  "version": "1.0.0",
  "description": "A minimal Electron and Python - based calculator ",
  "main": "main.js",
  "scripts": {
    "start": "electron ."
  },
  "repository": "https://github.com/fyears/electron-python-example",
  "keywords": [
    "Electron",
    "Python",
    "zerorpc",
    "demo"
  ],
  "author": "fyears",
  "license": "MIT",
  "dependencies": {
    "zerorpc": "^0.9.8"
  },
  "devDependencies": {
    "electron": "^1.7.6",
    "electron-packager": "^9.0.1"
  }
}

npm i

../binding.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE zmq::Socket::Sendv(Nan::NAN_METHOD_ARGS_TYPE)’:
../binding.cc:1295:39: error: no matching function for call to ‘v8::Array::Get(uint32_t&)’
       Local<Object> buf = batch->Get(i).As<Object>();
                                       ^
In file included from ../binding.cc:24:0:
/home/user/.cache/node-gyp/14.5.0/include/node/v8.h:3713:43: note: candidate: v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/user/.cache/node-gyp/14.5.0/include/node/v8.h:3713:43: note:   candidate expects 2 arguments, 1 provided
/home/user/.cache/node-gyp/14.5.0/include/node/v8.h:3716:43: note: candidate: v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/user/.cache/node-gyp/14.5.0/include/node/v8.h:3716:43: note:   candidate expects 2 arguments, 1 provided
../binding.cc:1295:50: error: expected primary-expression before ‘>’ token
       Local<Object> buf = batch->Get(i).As<Object>();
                                                  ^
../binding.cc:1295:52: error: expected primary-expression before ‘)’ token
       Local<Object> buf = batch->Get(i).As<Object>();
                                                    ^
../binding.cc:1296:48: error: no matching function for call to ‘v8::Array::Get(uint32_t)’
       Local<Number> flagsObj = batch->Get(i + 1).As<Number>();
                                                ^
In file included from ../binding.cc:24:0:
/home/user/.cache/node-gyp/14.5.0/include/node/v8.h:3713:43: note: candidate: v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/user/.cache/node-gyp/14.5.0/include/node/v8.h:3713:43: note:   candidate expects 2 arguments, 1 provided
/home/user/.cache/node-gyp/14.5.0/include/node/v8.h:3716:43: note: candidate: v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                           ^~~
/home/user/.cache/node-gyp/14.5.0/include/node/v8.h:3716:43: note:   candidate expects 2 arguments, 1 provided
../binding.cc:1296:59: error: expected primary-expression before ‘>’ token
       Local<Number> flagsObj = batch->Get(i + 1).As<Number>();
                                                           ^
../binding.cc:1296:61: error: expected primary-expression before ‘)’ token
       Local<Number> flagsObj = batch->Get(i + 1).As<Number>();
                                                             ^
zmq.target.mk:111: recipe for target 'Release/obj.target/zmq/binding.o' failed
make: *** [Release/obj.target/zmq/binding.o] Error 1
make: Leaving directory '/home/user/Code/python/electron-python-example/node_modules/zeromq/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/user/.nvm/versions/node/v14.5.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 5.4.0-42-generic
gyp ERR! command "/home/user/.nvm/versions/node/v14.5.0/bin/node" "/home/user/.nvm/versions/node/v14.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/user/Code/python/electron-python-example/node_modules/zeromq
gyp ERR! node -v v14.5.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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!     /home/user/.npm/_logs/2020-08-12T01_33_17_461Z-debug.log

Ubuntu 18.04
node v14.5.0
python --version: 2.7.17

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions