Code Monkey home page Code Monkey logo

aliyun-ons's Introduction

Hey y'all 👋, here's Khaidi Chu (Aka. XadillaX, 死月)

Flandre

A lagging people. A Node.js Core Collaborator born in the ’90s, passionate about gaming despite being not very skilled, a heavy VIM user, and proficient in macOS and Linux. Specializes in Node.js with secondary expertise in C++, enjoys playing with algorithms, admits to being a front-end novice, and does not work with Java. A retired ACM competitor. After college I used to work at

A WinterCG participant. And now I'm working on a Web-Interoperable Runtime (Aka. V8 Worker) named Hourai.js and High-density Deployment solution @ByteDance.

Contents

Welcome to read my blog and my books:

Name Type Date Remark
Node.js:来一打 C++ 扩展 Original 2018-06
精通 Vim Translated 2020-03 Modern Vim: Craft Your Development Environment with Vim 8 and Neovim
JavaScript 悟道 Translated 2021-06 How JavaScript Works
软件开发珠玑 Translated 2024-03 Software Development Pearls

And I love @Amunu so much.

Projects

To make my code like a shitty chocolate or to make it like a chocolatey shit, that's a question.

aliyun-ons's People

Contributors

xadillax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aliyun-ons's Issues

一个关于ONS的问题,并不是真的issue: )

谢谢你的repo,非常有帮助。
我刚接触ONS,读example代码的时候有两个基础的问题:

  1. consumer是怎么保证自己在忙的时候暂时不从producer获取message的呢?
  2. 假如一个topic有多个consumer,如何有效分配哪个consumer处理哪个message,并且不出现重复处理同一个message的情况呢?

npm install --save ons windows linux 都安装不了

npm install --save ons windows linux 都安装不了
windows
$ npm install ons --save

[email protected] install G:\bikeService\node_modules\ons
node-gyp rebuild

G:\bikeService\node_modules\ons>if not defined npm_config_node_gyp (node "D:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:454:19)
gyp ERR! stack at PythonFinder. (D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:480:16)
gyp ERR! stack at D:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:114:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "D:\Program Files\nodejs\node.exe" "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd G:\bikeService\node_modules\ons
gyp ERR! node -v v7.7.1
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
npm WARN Error: EPERM: operation not permitted, scandir 'G:\bikeService\node_modules\url\node_modules'
npm WARN { Error: EPERM: operation not permitted, scandir 'G:\bikeService\node_modules\url\node_modules'
npm WARN errno: -4048,
npm WARN code: 'EPERM',
npm WARN syscall: 'scandir',
npm WARN path: 'G:\bikeService\node_modules\url\node_modules' }
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "D:\Program Files\nodejs\node.exe" "D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "ons" "--save"
npm ERR! node v7.7.1
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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 ons 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 ons
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ons
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! G:\bikeService\npm-debug.log

linux
npm ERR! Linux 2.6.32-504.el6.x86_64
npm ERR! argv "/usr/local/nodejs/node-v7.7.2-linux-x64/bin/node" "/usr/local/nodejs/node-v7.7.2-linux-x64/bin/npm" "install" "--save" "ons"
npm ERR! node v7.7.2
npm ERR! npm v4.1.2
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! syscall read

npm ERR! network read ECONNRESET
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! Linux 2.6.32-504.el6.x86_64
npm ERR! argv "/usr/local/nodejs/node-v7.7.2-linux-x64/bin/node" "/usr/local/nodejs/node-v7.7.2-linux-x64/bin/npm" "install" "--save" "ons"
npm ERR! node v7.7.2
npm ERR! npm v4.1.2

npm ERR! shasum check failed for /tmp/npm-26689-dade03dc/registry.npmjs.org/ons/-/ons-4.1.0.tgz
npm ERR! Expected: e07d2b95911148bcb13438f175def6445485576b
npm ERR! Actual: 721c223d8e71319e5cbbfdc0d4673b67e0d92c42
npm ERR! From: https://registry.npmjs.org/ons/-/ons-4.1.0.tgz
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! /usr/local/nodejs/node_app/bike/npm-debug.log

One CID can't subscribe two Topic

I want to use one CID to subscribe two Topic, but if i use your SDK, i have to create two subscriber to do this.
const consumer1 = new Consumer(CUSTOMER_ID, TOPIC1, TAGS, ACCESS_KEY, SECRET_KEY, OPTIONS);
const consumer2 = new Consumer(CUSTOMER_ID, TOPIC2, TAGS, ACCESS_KEY, SECRET_KEY, OPTIONS);
And it is strange that just first consumer work, second consumer offline.

I hope use your SDK can support that:
const consumer = new Consumer(CUSTOMER_ID, ACCESS_KEY, SECRET_KEY, OPTIONS);
consumer.subscribe(TOPIC, TAG, async msg => { // do something });

Waiting for your help ...

安装失败

[email protected] install /home/alpha_times/node_modules/ons
node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
make: Entering directory /home/alpha_times/node_modules/ons/build' CXX(target) Release/obj.target/ons/src/entry.o CXX(target) Release/obj.target/ons/src/log_util.o ../src/log_util.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE AliyunONS::SetLogPath(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/log_util.cpp:35:51: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated (declared at /root/.node-gyp/10.0.0/include/node/v8.h:2821): Use Isolate version [-Wdeprecated-declarations] v8::String::Utf8Value path(info[0]->ToString()); ^ CXX(target) Release/obj.target/ons/src/ons_options.o ../src/ons_options.cpp: In constructor ‘ONSOptions::ONSOptions(v8::Local<v8::Value>)’: ../src/ons_options.cpp:54:49: error: no matching function for call to ‘v8::Value::ToInt32()’ thread_num = v8_thread_num->ToInt32()->Value(); ^ ../src/ons_options.cpp:54:49: note: candidates are: In file included from ../src/ons_options.h:25:0, from ../src/ons_options.cpp:21: /root/.node-gyp/10.0.0/include/node/v8.h:2378:43: note: v8::MaybeLocal<v8::Int32> v8::Value::ToInt32(v8::Local<v8::Context>) const V8_WARN_UNUSED_RESULT MaybeLocal<Int32> ToInt32(Local<Context> context) const; ^ /root/.node-gyp/10.0.0/include/node/v8.h:2378:43: note: candidate expects 1 argument, 0 provided In file included from /root/.node-gyp/10.0.0/include/node/v8.h:26:0, from ../src/ons_options.h:25, from ../src/ons_options.cpp:21: /root/.node-gyp/10.0.0/include/node/v8.h:2391:34: note: v8::Local<v8::Int32> v8::Value::ToInt32(v8::Isolate*) const Local<Int32> ToInt32(Isolate* isolate) const); ^ /root/.node-gyp/10.0.0/include/node/v8config.h:340:48: note: in definition of macro ‘V8_DEPRECATE_SOON’ #define V8_DEPRECATE_SOON(message, declarator) declarator ^ /root/.node-gyp/10.0.0/include/node/v8.h:2391:34: note: candidate expects 1 argument, 0 provided Local<Int32> ToInt32(Isolate* isolate) const); ^ /root/.node-gyp/10.0.0/include/node/v8config.h:340:48: note: in definition of macro ‘V8_DEPRECATE_SOON’ #define V8_DEPRECATE_SOON(message, declarator) declarator ^ ../src/ons_options.cpp:59:75: error: no matching function for call to ‘v8::Value::ToInt32()’ send_msg_timeout_millis = v8_send_msg_timeout_millis->ToInt32()->Value(); ^ ../src/ons_options.cpp:59:75: note: candidates are: In file included from ../src/ons_options.h:25:0, from ../src/ons_options.cpp:21: /root/.node-gyp/10.0.0/include/node/v8.h:2378:43: note: v8::MaybeLocal<v8::Int32> v8::Value::ToInt32(v8::Local<v8::Context>) const V8_WARN_UNUSED_RESULT MaybeLocal<Int32> ToInt32(Local<Context> context) const; ^ /root/.node-gyp/10.0.0/include/node/v8.h:2378:43: note: candidate expects 1 argument, 0 provided In file included from /root/.node-gyp/10.0.0/include/node/v8.h:26:0, from ../src/ons_options.h:25, from ../src/ons_options.cpp:21: /root/.node-gyp/10.0.0/include/node/v8.h:2391:34: note: v8::Local<v8::Int32> v8::Value::ToInt32(v8::Isolate*) const Local<Int32> ToInt32(Isolate* isolate) const); ^ /root/.node-gyp/10.0.0/include/node/v8config.h:340:48: note: in definition of macro ‘V8_DEPRECATE_SOON’ #define V8_DEPRECATE_SOON(message, declarator) declarator ^ /root/.node-gyp/10.0.0/include/node/v8.h:2391:34: note: candidate expects 1 argument, 0 provided Local<Int32> ToInt32(Isolate* isolate) const); ^ /root/.node-gyp/10.0.0/include/node/v8config.h:340:48: note: in definition of macro ‘V8_DEPRECATE_SOON’ #define V8_DEPRECATE_SOON(message, declarator) declarator ^ ../src/ons_options.cpp:64:59: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated (declared at /root/.node-gyp/10.0.0/include/node/v8.h:2821): Use Isolate version [-Wdeprecated-declarations] ons_addr = *(v8::String::Utf8Value(v8_ons_addr)); ^ ../src/ons_options.cpp:69:67: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated (declared at /root/.node-gyp/10.0.0/include/node/v8.h:2821): Use Isolate version [-Wdeprecated-declarations] namesrv_addr = *(v8::String::Utf8Value(v8_namesrv_addr)); ^ make: *** [Release/obj.target/ons/src/ons_options.o] Error 1 make: Leaving directory /home/alpha_times/node_modules/ons/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/root/.nvm/versions/node/v10.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:225:12)
gyp ERR! System Linux 3.10.0-327.22.2.el7.x86_64
gyp ERR! command "/root/.nvm/versions/node/v10.0.0/bin/node" "/root/.nvm/versions/node/v10.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/alpha_times/node_modules/ons
gyp ERR! node -v v10.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: 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! /root/.npm/_logs/2018-10-13T03_32_10_476Z-debug.log
[root@izwz94xswj2tx87sh1v2lyz alpha_times]#

linux里require出现以下异常

TypeError: invalid data
at WriteStream.Socket.write (net.js:625:11)
at /acs/upload/node_modules/ons/lib/_stdout.js:36:34
at Array.forEach (native)
at Object.exports.restoreStdout (/acs/upload/node_modules/ons/lib/_stdout.js:35:13)
at /acs/upload/node_modules/ons/lib/producer.js:47:33

[需求]作者有没有计划基于RocketMQ来实现

不知道作者有没有计划做支持?没有具体研究基于ONS和基于RocketM差异多大,理论上应该不大,看了一下源码,想提个PR支持,但看了一下,要熟悉整个项目才好动手,不知道作者看是否列入计划中?

windows 平台 Error: Topic Route does not exist

example / producer.js
提示 Error: Topic Route does not exist

consumer.js 测试 OK

同样的代码在 LInux Centos6.5/7 下 运行正常

win8.1 64位 msvs_version 2015 编译 node v6.2.0 npm 3.10.7

Object.exports.restoreStdout (/home/vagrant/server/web/node_modules/.npminstall/ons/2.3.1/ons/lib/_stdout.js:35:13)

throw new TypeError('invalid data');
    ^

TypeError: invalid data
    at WriteStream.Socket.write (net.js:641:11)
    at /home/vagrant/server/web/node_modules/.npminstall/ons/2.3.1/ons/lib/_stdout.js:36:34
    at Array.forEach (native)
    at Object.exports.restoreStdout (/home/vagrant/server/web/node_modules/.npminstall/ons/2.3.1/ons/lib/_stdout.js:35:13)
    at /home/vagrant/server/web/node_modules/.npminstall/ons/2.3.1/ons/lib/consumer.js:91:33

Issue found by @mapleincode.

Working with a local instance of RocketMq

Hi,

I have a question about your library. Is it compatible with a local RocketMQ server ?
I followed the get started documentation here: http://rocketmq.incubator.apache.org/docs/quick-start/. Everything works fine but I can't figure out how to make it work with this lib. perhaps it's just the config... is it possible to add an example in your example folder that is compatible with the get started doc or just compatible with local server (with a default config, e.g localhost:9876).

Any help will be appreciate.. Thanks

Failed to get async object with no thread_count option in consumer

$ NODE_ONS_LOG=true node foo.js

[0B0B0B0B00000000000029D801000000][---] ack inner created: 0x7FBC94004350
[0B0B0B0B00000000000029D801000000][---] message handler param created: 0x7FBC94000C40
[0B0B0B0B00000000000029D801000000][----] failed to get async object
[0B0B0B0B00000000000029D801000000][---] ack inner deleted: 0x7FBC94004350
[0B0B0B0B00000000000029D801000000][---] message handler parameter deleted: 0x7FBC94000C40

and when new Consumer, pass no thread_count.

不兼容 nodejs 5.x , 6.x

运行环境 Ubuntu 14.04

在nodejs 5.x 下运行结果

Error: Module version mismatch. Expected 47, got 46.
    at Error (native)
    at Object.Module._extensions..node (module.js:440:18)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at Object.<anonymous> (/data/projects/pusher/node_modules/ons/lib/consumer.js:16:17)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)

6.x 下

Error: Module version mismatch. Expected 48, got 46.
    at Error (native)
    at Object.Module._extensions..node (module.js:568:18)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/data/projects/pusher/node_modules/ons/lib/consumer.js:16:17)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)

windows安装失败

你好,我在Windows下安装失败,请问现在windows下可以用么?

Error: Error relocating /app/node_modules/ons/build/Release/ons.node: backtrace_symbols: symbol not found

/app # node .
module.js:598
  return process.dlopen(module, path._makeLong(filename));
                 ^

Error: Error relocating /app/node_modules/ons/build/Release/ons.node: backtrace_symbols: symbol not found
    at Object.Module._extensions..node (module.js:598:18)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/app/node_modules/ons/lib/logger.js:17:19)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
/app # 

producer 如何指定 mqttSecondTopic,两个consumer 消息会重复怎么搞

1、关于 MQTT 收到 procuder 发布的消息问题
如果不指定 mqttSecondTopic ,MQTT端就收不到消息了

2、同时启动两个consumer,消息会重复问题
启动一个 procuder,每100ms发一条消息
启动两个 consumer 收消息,两个 consumer 收到的消息会重复【有ack.done()】
OMG,这应该是aliyun的问题吧。。。

谢谢

the error when pass `undefined` options to producer

var Producer = function ONSProducer(producerId, accessKey, secretKey, options) {
    Object.defineProperties(this, {
        producer: {
            enumerable: false,
            writable: false,
            configurable: false,
            value: new _Producer(producerId, accessKey, secretKey, options) // jshint ignore: line
        },

        keepTimer: {
            enumerable: false,
            writable: true,
            configurable: true,
            value: null
        },

        producerId: {
            enumerable: true,
            writable: false,
            configurable: false,
            value: producerId
        },

        isOrder: {
            enumerable: true,
            writable: false,
            configurable: false,
            value: !!options.order
        }
    });
};

options could be undefined

Native throwed an error "std::bad_alloc"

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
[1]    29945 abort (core dumped)

with code:

const consumer = new require("../").Consumer(
    config.consumerId,
    config.topic,
    "*",
    config.accessKey,
    config.secretKey);

内存泄露 , CPU 占用过高

与上位仁兄一样的代码,、
配置:1核1g内存。pm2守护
消费情况:一个对列,一个consumer,持续不间断消费
结果:大约每隔2小时,内存100%,cpu100%,然后进程重启

/**

  •        ___
    
  •  |     | |
    
  • / \    | |
    
  • |--o|===|-|
  • |---| |n|
  • / \ |o|
  • | O | |d|
  • | N |=|e|
  • | S | | |
  • |______| ||
  • |@| |@| | |
  • ___________||

中文文档send()参数顺序错误

英文文档是:

producer.send([KEY,] TOPIC, TAGS, CONTENT, [DELAY,] [SHARDING_KEY,] function(err, messageId) {
    console.log(arguments);
});

中文则是:

producer.send([KEY,] TOPIC, TAGS, CONTENT, [SHARDING_KEY,] [DELAY,] function(err, messageId) {
    console.log(arguments);
});

DELAY和SHARDING_KEY,顺序错了

内存泄露 , CPU 占用过高

const Ons = require('ons');
const Consumer = Ons.Consumer;

const CONSUMER_ID = 'CID-EVENT-***';
const TOPIC = 'TERMINAL-MQ-****';
const ACCESS_KEY = '********************';
const SECRET_KEY = '********************************';

const consumer = new Consumer(CONSUMER_ID, TOPIC, '*', ACCESS_KEY, SECRET_KEY);

consumer.on('message', (msg, ack) => {
    ack.done();
});

consumer.init((err) => {
    if(err) {
        console.log(err);
    } else {
        console.log('开始监听 ons!');
        consumer.listen();
    }
    console.log('ons started!!');
});

该代码会导致内存持续上升, 并且消息处理完之后 CPU 使用率也不会下降

重启服务经常会报

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::thread_resource_error> >'
  what():  boost::thread_resource_error: Resource temporarily unavailable
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::thread_resource_error> >'Aborted
live@biz26:/data/projects/pusher$ terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::erro

在ubuntu14.04下编译失败,node版本4.3.2

root@iZ944lt6gklZ:/tmp/tmp# npm i ons

[email protected] install /tmp/tmp/node_modules/ons
node-gyp rebuild

make: Entering directory `/tmp/tmp/node_modules/ons/build'
  CXX(target) Release/obj.target/ons/src/entry.o
  CXX(target) Release/obj.target/ons/src/consumer_ack.o
  CXX(target) Release/obj.target/ons/src/consumer.o
../src/consumer.cpp: In static member function ‘static void ONSConsumerV8::HandleMessage(uv_async_t*)’:
../src/consumer.cpp:261:92: error: no matching function for call to ‘SetMethod(v8::Local<v8::ObjectTemplate>&, const char [5], void (&)(const Nan::FunctionCallbackInfo<v8::Value>&))’
     Nan::SetMethod<v8::Local<v8::ObjectTemplate>>(ack_templ, "done", ONSConsumerACKV8::Done);
                                                                                            ^
../src/consumer.cpp:261:92: note: candidate is:
In file included from ../src/consumer.h:20:0,
                 from ../src/consumer.cpp:18:
../node_modules/nan/nan.h:1884:17: note: template<class T, template<class> class HandleType> void Nan::SetMethod(HandleType<T>, const char*, Nan::FunctionCallback)
 NAN_INLINE void SetMethod(
                 ^
../node_modules/nan/nan.h:1884:17: note:   template argument deduction/substitution failed:
../src/consumer.cpp:261:92: note:   deduced conflicting types for parameter ‘T’ (‘v8::Local<v8::ObjectTemplate>’ and ‘v8::ObjectTemplate’)
     Nan::SetMethod<v8::Local<v8::ObjectTemplate>>(ack_templ, "done", ONSConsumerACKV8::Done);
                                                                                            ^
make: *** [Release/obj.target/ons/src/consumer.o] Error 1
make: Leaving directory `/tmp/tmp/node_modules/ons/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.13.0-32-generic
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 /tmp/tmp/node_modules/ons
gyp ERR! node -v v4.3.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Linux 3.13.0-32-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "ons"
npm ERR! node v4.3.2
npm ERR! npm  v2.14.12
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the ons 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 their info via:
npm ERR!     npm owner ls ons
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /tmp/tmp/npm-debug.log

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.