Giter Club home page Giter Club logo

msgpack-node's Introduction

MessagePack

MessagePack is an efficient binary serialization format. It's like JSON. but fast and small.

This repository manages specification of MessagePack format. See Spec for the specification.

Implementation projects have each own repository. See msgpack.org website to find implementations and their documents.

If you'd like to show your msgpack implementation to the msgpack.org website, please follow the website document.

msgpack-node's People

Contributors

bombela avatar bpot avatar crow-misia avatar dainis avatar godsflaw avatar htaox avatar matthiasg avatar maxtaco avatar mikepb avatar mog422 avatar mscdex avatar pgriess avatar rashfael avatar sdepold avatar squamos avatar tomtaylor avatar touhonoob avatar walf443 avatar 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  avatar  avatar  avatar  avatar  avatar  avatar

msgpack-node's Issues

Stream: unpacking '0' doesn't trigger 'msg' emit

msgpack.js: line 73, it should be if (msg == null), instead of if (!msg) - if msg as unpacked correctly as 0, would silent the 'msg' emission. Please fix.

ps: is this project dead already? if there is no maintainer anymore, please consider transferring the repo ownership, so the community can hopefully keep it alive. Thanks!

Failed to build with node v16.10.0

$ yarn add msgpack

yarn add v1.22.15
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
[1/2] ⠠ argon2
error /Users/xxx/prog/passzero/node_modules/msgpack: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/xxxxx/prog/passzero/node_modules/msgpack
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info find Python using Python version 3.9.7 found at "/Users/xxxx/prog/passzero/env/bin/python3"
(node:41989) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use node --trace-deprecation ... to show where the warning was created)
gyp info spawn /Users/xxxxxx/prog/passzero/env/bin/python3
gyp info spawn args [
gyp info spawn args '/usr/local/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/xxxxx/prog/passzero/node_modules/msgpack/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/xxxxx/Library/Caches/node-gyp/16.10.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/xxxxx/Library/Caches/node-gyp/16.10.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/xxxxxx/Library/Caches/node-gyp/16.10.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/xxxxxxx/prog/passzero/node_modules/msgpack',
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' ]
CC(target) Release/obj.target/libmsgpack/deps/msgpack/objectc.o
CC(target) Release/obj.target/libmsgpack/deps/msgpack/unpack.o
CC(target) Release/obj.target/libmsgpack/deps/msgpack/vrefbuffer.o
CC(target) Release/obj.target/libmsgpack/deps/msgpack/zone.o
CC(target) Release/obj.target/libmsgpack/deps/msgpack/version.o
LIBTOOL-STATIC Release/msgpack.a
CXX(target) Release/obj.target/msgpackBinding/src/msgpack.o
In file included from ../src/msgpack.cc:1:
In file included from /Users/xxxxxxx/Library/Caches/node-gyp/16.10.0/include/node/v8.h:30:
/Users/xxxxxxx/Library/Caches/node-gyp/16.10.0/include/node/v8-internal.h:489:38: error: no template named 'remove_cv_t' in namespace 'std'; did you mean 'remove_cv'?
!std::is_same<Data, std::remove_cv_t>::value>::Perform(data);
~~~~~^~~~~~~~~~~
remove_cv
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:776:50: note: 'remove_cv' declared here
template struct _LIBCPP_TEMPLATE_VIS remove_cv
^
1 error generated.
make: *** [Release/obj.target/msgpackBinding/src/msgpack.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/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (node:events:390:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Darwin 20.6.0
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 /Users/xxxxxxx/prog/passzero/node_modules/msgpack
gyp ERR! node -v v16.10.0
gyp ERR! node-gyp -v v7.1.2
gyp ERR! not ok

Doesnt work on 4.2.6

IT doesnt work on 4.2.6 i have also tried 0.10 and 0.12

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'msgpack' ]
2 info using [email protected]
3 info using [email protected]
4 verbose config Skipping project config: C:\Users\Petter/.npmrc. (matches userconfig)
5 verbose install initial load of C:\Users\Petter\package.json
6 verbose installManyTop reading scoped package data from C:\Users\Petter\node_modules\nan\package.json
7 verbose readDependencies loading dependencies from C:\Users\Petter\package.json
8 silly cache add args [ 'msgpack', null ]
9 verbose cache add spec msgpack
10 silly cache add parsed spec Result {
10 silly cache add raw: 'msgpack',
10 silly cache add scope: null,
10 silly cache add name: 'msgpack',
10 silly cache add rawSpec: '',
10 silly cache add spec: 'latest',
10 silly cache add type: 'tag' }
11 silly addNamed msgpack@latest
12 verbose addNamed "latest" is being treated as a dist-tag for msgpack
13 info addNameTag [ 'msgpack', 'latest' ]
14 silly mapToRegistry name msgpack
15 silly mapToRegistry using default registry
16 silly mapToRegistry registry https://registry.npmjs.org/
17 silly mapToRegistry uri https://registry.npmjs.org/msgpack
18 verbose addNameTag registry:https://registry.npmjs.org/msgpack not in flight; fetching
19 verbose request uri https://registry.npmjs.org/msgpack
20 verbose request no auth needed
21 info attempt registry request try #1 at 15:01:52
22 verbose request id 8e3c3758b9400929
23 verbose etag "3HVEMFQYGOP6Q21FECOBT6SOM"
24 http request GET https://registry.npmjs.org/msgpack
25 http 304 https://registry.npmjs.org/msgpack
26 verbose headers { date: 'Sun, 24 Jan 2016 14:01:46 GMT',
26 verbose headers via: '1.1 varnish',
26 verbose headers 'cache-control': 'max-age=300',
26 verbose headers etag: '"3HVEMFQYGOP6Q21FECOBT6SOM"',
26 verbose headers age: '0',
26 verbose headers connection: 'keep-alive',
26 verbose headers 'x-served-by': 'cache-ams4131-AMS',
26 verbose headers 'x-cache': 'HIT',
26 verbose headers 'x-cache-hits': '1',
26 verbose headers 'x-timer': 'S1453644106.123112,VS0,VE664',
26 verbose headers vary: 'Accept' }
27 silly get cb [ 304,
27 silly get { date: 'Sun, 24 Jan 2016 14:01:46 GMT',
27 silly get via: '1.1 varnish',
27 silly get 'cache-control': 'max-age=300',
27 silly get etag: '"3HVEMFQYGOP6Q21FECOBT6SOM"',
27 silly get age: '0',
27 silly get connection: 'keep-alive',
27 silly get 'x-served-by': 'cache-ams4131-AMS',
27 silly get 'x-cache': 'HIT',
27 silly get 'x-cache-hits': '1',
27 silly get 'x-timer': 'S1453644106.123112,VS0,VE664',
27 silly get vary: 'Accept' } ]
28 verbose etag https://registry.npmjs.org/msgpack from cache
29 verbose get saving msgpack to C:\Users\Petter\AppData\Roaming\npm-cache\registry.npmjs.org\msgpack.cache.json
30 silly addNameTag next cb for msgpack with tag latest
31 silly addNamed [email protected]
32 verbose addNamed "1.0.2" is a plain semver version for msgpack
33 silly cache afterAdd [email protected]
34 verbose afterAdd C:\Users\Petter\AppData\Roaming\npm-cache\msgpack\1.0.2\package\package.json not in flight; writing
35 verbose afterAdd C:\Users\Petter\AppData\Roaming\npm-cache\msgpack\1.0.2\package\package.json written
36 silly install resolved [ { name: 'msgpack',
36 silly install resolved description: 'A space-efficient object serialization library for node.js',
36 silly install resolved version: '1.0.2',
36 silly install resolved homepage: 'https://github.com/msgpack/msgpack-node',
36 silly install resolved contributors:
36 silly install resolved [ [Object],
36 silly install resolved [Object],
36 silly install resolved [Object],
36 silly install resolved [Object],
36 silly install resolved [Object],
36 silly install resolved [Object],
36 silly install resolved [Object],
36 silly install resolved [Object],
36 silly install resolved [Object],
36 silly install resolved [Object],
36 silly install resolved [Object],
36 silly install resolved [Object] ],
36 silly install resolved repository:
36 silly install resolved { type: 'git',
36 silly install resolved url: 'git+https://github.com/msgpack/msgpack-node.git' },
36 silly install resolved main: './lib/msgpack',
36 silly install resolved directories: { lib: 'lib' },
36 silly install resolved dependencies: { nan: '^2.0.9' },
36 silly install resolved devDependencies: { nodeunit: 'https://github.com/godsflaw/nodeunit/archive/master.tar.gz' },
36 silly install resolved engines: { node: '>=0.12.7' },
36 silly install resolved bin:
36 silly install resolved { json2msgpack: './bin/json2msgpack',
36 silly install resolved msgpack2json: './bin/msgpack2json' },
36 silly install resolved scripts: { test: './run_tests', install: 'node-gyp rebuild' },
36 silly install resolved gypfile: true,
36 silly install resolved gitHead: '3c05e7fc10a2b9e8d4843f1c7e441656e9b2561d',
36 silly install resolved bugs: { url: 'https://github.com/msgpack/msgpack-node/issues' },
36 silly install resolved _id: '[email protected]',
36 silly install resolved _shasum: '923e2c5cffa65c8418e9b228d1124793969c429c',
36 silly install resolved _from: 'msgpack@latest',
36 silly install resolved _npmVersion: '2.14.2',
36 silly install resolved _nodeVersion: '4.0.0',
36 silly install resolved _npmUser: { name: 'godsflaw', email: '[email protected]' },
36 silly install resolved maintainers: [ [Object], [Object], [Object] ],
36 silly install resolved dist:
36 silly install resolved { shasum: '923e2c5cffa65c8418e9b228d1124793969c429c',
36 silly install resolved tarball: 'http://registry.npmjs.org/msgpack/-/msgpack-1.0.2.tgz' },
36 silly install resolved _resolved: 'https://registry.npmjs.org/msgpack/-/msgpack-1.0.2.tgz',
36 silly install resolved readme: 'ERROR: No README data found!' } ]
37 info install [email protected] into C:\Users\Petter
38 info installOne [email protected]
39 verbose installOne of msgpack to C:\Users\Petter not in flight; installing
40 verbose lock using C:\Users\Petter\AppData\Roaming\npm-cache_locks\msgpack-68ee4676dba95d81.lock for C:\Users\Petter\node_modules\msgpack
41 silly install write writing msgpack 1.0.2 to C:\Users\Petter\node_modules\msgpack
42 verbose unbuild node_modules\msgpack
43 silly gentlyRm C:\Users\Petter\node_modules\msgpack is being purged from base C:\Users\Petter
44 verbose gentlyRm don't care about contents; nuking C:\Users\Petter\node_modules\msgpack
45 verbose tar unpack C:\Users\Petter\AppData\Roaming\npm-cache\msgpack\1.0.2\package.tgz
46 verbose tar unpacking to C:\Users\Petter\node_modules\msgpack
47 silly gentlyRm C:\Users\Petter\node_modules\msgpack is being purged
48 verbose gentlyRm don't care about contents; nuking C:\Users\Petter\node_modules\msgpack
49 silly gunzTarPerm modes [ '777', '666' ]
50 silly gunzTarPerm extractEntry package.json
51 silly gunzTarPerm modified mode [ 'package.json', 420, 438 ]
52 silly gunzTarPerm extractEntry .npmignore
53 silly gunzTarPerm modified mode [ '.npmignore', 420, 438 ]
54 silly gunzTarPerm extractEntry README.md
55 silly gunzTarPerm modified mode [ 'README.md', 420, 438 ]
56 silly gunzTarPerm extractEntry LICENSE
57 silly gunzTarPerm modified mode [ 'LICENSE', 420, 438 ]
58 silly gunzTarPerm extractEntry bin/json2msgpack
59 silly gunzTarPerm modified mode [ 'bin/json2msgpack', 493, 511 ]
60 silly gunzTarPerm extractEntry bin/msgpack2json
61 silly gunzTarPerm modified mode [ 'bin/msgpack2json', 493, 511 ]
62 silly gunzTarPerm extractEntry binding.gyp
63 silly gunzTarPerm modified mode [ 'binding.gyp', 420, 438 ]
64 silly gunzTarPerm extractEntry deps/msgpack/LICENSE
65 silly gunzTarPerm modified mode [ 'deps/msgpack/LICENSE', 420, 438 ]
66 silly gunzTarPerm extractEntry deps/msgpack/msgpack.h
67 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack.h', 420, 438 ]
68 silly gunzTarPerm extractEntry deps/msgpack/AUTHORS
69 silly gunzTarPerm modified mode [ 'deps/msgpack/AUTHORS', 420, 438 ]
70 silly gunzTarPerm extractEntry deps/msgpack/gcc_atomic.hpp
71 silly gunzTarPerm modified mode [ 'deps/msgpack/gcc_atomic.hpp', 420, 438 ]
72 silly gunzTarPerm extractEntry deps/msgpack/msgpack/sysdep.h
73 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/sysdep.h', 420, 438 ]
74 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/list.hpp
75 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/list.hpp', 420, 438 ]
76 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/adaptor_base.hpp
77 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/adaptor_base.hpp', 420, 438 ]
78 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/char_ptr.hpp
79 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/char_ptr.hpp', 420, 438 ]
80 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/check_container_size.hpp
81 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/check_container_size.hpp',
81 silly gunzTarPerm 420,
81 silly gunzTarPerm 438 ]
82 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/cpp11/array.hpp
83 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/cpp11/array.hpp', 420, 438 ]
84 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/cpp11/array_char.hpp
85 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/cpp11/array_char.hpp', 420, 438 ]
86 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/cpp11/forward_list.hpp
87 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/cpp11/forward_list.hpp',
87 silly gunzTarPerm 420,
87 silly gunzTarPerm 438 ]
88 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/cpp11/tuple.hpp
89 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/cpp11/tuple.hpp', 420, 438 ]
90 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/cpp11/unordered_map.hpp
91 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/cpp11/unordered_map.hpp',
91 silly gunzTarPerm 420,
91 silly gunzTarPerm 438 ]
92 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/cpp11/unordered_set.hpp
93 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/cpp11/unordered_set.hpp',
93 silly gunzTarPerm 420,
93 silly gunzTarPerm 438 ]
94 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/define.hpp
95 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/define.hpp', 420, 438 ]
96 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/deque.hpp
97 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/deque.hpp', 420, 438 ]
98 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/detail/cpp03_define.hpp
99 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/detail/cpp03_define.hpp',
99 silly gunzTarPerm 420,
99 silly gunzTarPerm 438 ]
100 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/detail/cpp03_msgpack_tuple.hpp
101 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/detail/cpp03_msgpack_tuple.hpp',
101 silly gunzTarPerm 420,
101 silly gunzTarPerm 438 ]
102 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/detail/cpp11_define.hpp
103 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/detail/cpp11_define.hpp',
103 silly gunzTarPerm 420,
103 silly gunzTarPerm 438 ]
104 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/detail/cpp11_msgpack_tuple.hpp
105 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/detail/cpp11_msgpack_tuple.hpp',
105 silly gunzTarPerm 420,
105 silly gunzTarPerm 438 ]
106 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/fixint.hpp
107 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/fixint.hpp', 420, 438 ]
108 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/float.hpp
109 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/float.hpp', 420, 438 ]
110 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/int.hpp
111 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/int.hpp', 420, 438 ]
112 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/bool.hpp
113 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/bool.hpp', 420, 438 ]
114 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/map.hpp
115 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/map.hpp', 420, 438 ]
116 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/msgpack_tuple.hpp
117 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/msgpack_tuple.hpp', 420, 438 ]
118 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/nil.hpp
119 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/nil.hpp', 420, 438 ]
120 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/pair.hpp
121 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/pair.hpp', 420, 438 ]
122 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/raw.hpp
123 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/raw.hpp', 420, 438 ]
124 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/set.hpp
125 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/set.hpp', 420, 438 ]
126 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/string.hpp
127 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/string.hpp', 420, 438 ]
128 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/tr1/unordered_map.hpp
129 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/tr1/unordered_map.hpp',
129 silly gunzTarPerm 420,
129 silly gunzTarPerm 438 ]
130 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/tr1/unordered_set.hpp
131 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/tr1/unordered_set.hpp',
131 silly gunzTarPerm 420,
131 silly gunzTarPerm 438 ]
132 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/vector.hpp
133 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/vector.hpp', 420, 438 ]
134 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/vector_bool.hpp
135 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/vector_bool.hpp', 420, 438 ]
136 silly gunzTarPerm extractEntry deps/msgpack/msgpack/adaptor/vector_char.hpp
137 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/adaptor/vector_char.hpp', 420, 438 ]
138 silly gunzTarPerm extractEntry deps/msgpack/msgpack/detail/cpp03_zone.hpp
139 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/detail/cpp03_zone.hpp', 420, 438 ]
140 silly gunzTarPerm extractEntry deps/msgpack/msgpack/detail/cpp11_zone.hpp
141 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/detail/cpp11_zone.hpp', 420, 438 ]
142 silly gunzTarPerm extractEntry deps/msgpack/msgpack/fbuffer.h
143 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/fbuffer.h', 420, 438 ]
144 silly gunzTarPerm extractEntry deps/msgpack/msgpack/fbuffer.hpp
145 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/fbuffer.hpp', 420, 438 ]
146 silly gunzTarPerm extractEntry deps/msgpack/msgpack/gcc_atomic.h
147 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/gcc_atomic.h', 420, 438 ]
148 silly gunzTarPerm extractEntry deps/msgpack/msgpack/iterator.hpp
149 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/iterator.hpp', 420, 438 ]
150 silly gunzTarPerm extractEntry deps/msgpack/msgpack/object.h
151 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/object.h', 420, 438 ]
152 silly gunzTarPerm extractEntry deps/msgpack/msgpack/object.hpp
153 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/object.hpp', 420, 438 ]
154 silly gunzTarPerm extractEntry deps/msgpack/msgpack/object_fwd.hpp
155 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/object_fwd.hpp', 420, 438 ]
156 silly gunzTarPerm extractEntry deps/msgpack/msgpack/pack.h
157 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/pack.h', 420, 438 ]
158 silly gunzTarPerm extractEntry deps/msgpack/msgpack/pack.hpp
159 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/pack.hpp', 420, 438 ]
160 silly gunzTarPerm extractEntry deps/msgpack/msgpack/pack_define.h
161 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/pack_define.h', 420, 438 ]
162 silly gunzTarPerm extractEntry deps/msgpack/msgpack/pack_template.h
163 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/pack_template.h', 420, 438 ]
164 silly gunzTarPerm extractEntry deps/msgpack/msgpack/sbuffer.h
165 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/sbuffer.h', 420, 438 ]
166 silly gunzTarPerm extractEntry deps/msgpack/msgpack/sbuffer.hpp
167 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/sbuffer.hpp', 420, 438 ]
168 silly gunzTarPerm extractEntry deps/msgpack/msgpack/cpp_config.hpp
169 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/cpp_config.hpp', 420, 438 ]
170 silly gunzTarPerm extractEntry deps/msgpack/msgpack/type.hpp
171 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/type.hpp', 420, 438 ]
172 silly gunzTarPerm extractEntry deps/msgpack/msgpack/unpack.h
173 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/unpack.h', 420, 438 ]
174 silly gunzTarPerm extractEntry deps/msgpack/msgpack/unpack.hpp
175 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/unpack.hpp', 420, 438 ]
176 silly gunzTarPerm extractEntry deps/msgpack/msgpack/unpack_define.h
177 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/unpack_define.h', 420, 438 ]
178 silly gunzTarPerm extractEntry deps/msgpack/msgpack/unpack_template.h
179 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/unpack_template.h', 420, 438 ]
180 silly gunzTarPerm extractEntry deps/msgpack/msgpack/util.h
181 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/util.h', 420, 438 ]
182 silly gunzTarPerm extractEntry deps/msgpack/msgpack/version.h
183 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/version.h', 420, 438 ]
184 silly gunzTarPerm extractEntry deps/msgpack/msgpack/version.hpp
185 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/version.hpp', 420, 438 ]
186 silly gunzTarPerm extractEntry deps/msgpack/msgpack/version_master.h
187 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/version_master.h', 420, 438 ]
188 silly gunzTarPerm extractEntry deps/msgpack/msgpack/versioning.hpp
189 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/versioning.hpp', 420, 438 ]
190 silly gunzTarPerm extractEntry deps/msgpack/msgpack/vrefbuffer.h
191 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/vrefbuffer.h', 420, 438 ]
192 silly gunzTarPerm extractEntry deps/msgpack/msgpack/vrefbuffer.hpp
193 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/vrefbuffer.hpp', 420, 438 ]
194 silly gunzTarPerm extractEntry deps/msgpack/msgpack/zbuffer.h
195 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/zbuffer.h', 420, 438 ]
196 silly gunzTarPerm extractEntry deps/msgpack/msgpack/zbuffer.hpp
197 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/zbuffer.hpp', 420, 438 ]
198 silly gunzTarPerm extractEntry deps/msgpack/msgpack/zone.h
199 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/zone.h', 420, 438 ]
200 silly gunzTarPerm extractEntry deps/msgpack/msgpack/zone.hpp
201 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack/zone.hpp', 420, 438 ]
202 silly gunzTarPerm extractEntry deps/msgpack/msgpack.gyp
203 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack.gyp', 420, 438 ]
204 silly gunzTarPerm extractEntry deps/msgpack/COPYING
205 silly gunzTarPerm modified mode [ 'deps/msgpack/COPYING', 420, 438 ]
206 silly gunzTarPerm extractEntry deps/msgpack/msgpack.hpp
207 silly gunzTarPerm modified mode [ 'deps/msgpack/msgpack.hpp', 420, 438 ]
208 silly gunzTarPerm extractEntry deps/msgpack/objectc.c
209 silly gunzTarPerm modified mode [ 'deps/msgpack/objectc.c', 420, 438 ]
210 silly gunzTarPerm extractEntry deps/msgpack/unpack.c
211 silly gunzTarPerm modified mode [ 'deps/msgpack/unpack.c', 420, 438 ]
212 silly gunzTarPerm extractEntry deps/msgpack/version.c
213 silly gunzTarPerm modified mode [ 'deps/msgpack/version.c', 420, 438 ]
214 silly gunzTarPerm extractEntry deps/msgpack/vrefbuffer.c
215 silly gunzTarPerm modified mode [ 'deps/msgpack/vrefbuffer.c', 420, 438 ]
216 silly gunzTarPerm extractEntry deps/msgpack/zone.c
217 silly gunzTarPerm modified mode [ 'deps/msgpack/zone.c', 420, 438 ]
218 silly gunzTarPerm extractEntry lib/msgpack.js
219 silly gunzTarPerm modified mode [ 'lib/msgpack.js', 420, 438 ]
220 silly gunzTarPerm extractEntry src/msgpack.cc
221 silly gunzTarPerm modified mode [ 'src/msgpack.cc', 420, 438 ]
222 silly gunzTarPerm extractEntry .travis.yml
223 silly gunzTarPerm modified mode [ '.travis.yml', 420, 438 ]
224 silly gunzTarPerm extractEntry run_tests
225 silly gunzTarPerm modified mode [ 'run_tests', 493, 511 ]
226 silly gunzTarPerm extractEntry test/regression.js
227 silly gunzTarPerm modified mode [ 'test/regression.js', 420, 438 ]
228 silly gunzTarPerm extractEntry test/benchmark/benchmark.js
229 silly gunzTarPerm modified mode [ 'test/benchmark/benchmark.js', 420, 438 ]
230 silly gunzTarPerm extractEntry test/fixtures/stub.js
231 silly gunzTarPerm modified mode [ 'test/fixtures/stub.js', 420, 438 ]
232 silly gunzTarPerm extractEntry test/lib/msgpack.js
233 silly gunzTarPerm modified mode [ 'test/lib/msgpack.js', 420, 438 ]
234 verbose write writing to C:\Users\Petter\node_modules\msgpack\package.json
235 info preinstall [email protected]
236 verbose readDependencies loading dependencies from C:\Users\Petter\node_modules\msgpack\package.json
237 verbose readDependencies loading dependencies from C:\Users\Petter\node_modules\msgpack\package.json
238 silly install resolved []
239 verbose about to build C:\Users\Petter\node_modules\msgpack
240 info build C:\Users\Petter\node_modules\msgpack
241 info linkStuff [email protected]
242 silly linkStuff [email protected] has C:\Users\Petter\node_modules as its parent node_modules
243 verbose linkBins [email protected]
244 verbose link bins [ { json2msgpack: './bin/json2msgpack',
244 verbose link bins msgpack2json: './bin/msgpack2json' },
244 verbose link bins 'C:\Users\Petter\node_modules.bin',
244 verbose link bins false ]
245 verbose linkMans [email protected]
246 verbose rebuildBundles [email protected]
247 info install [email protected]
248 verbose unsafe-perm in lifecycle true
249 info [email protected] Failed to exec install script
250 verbose unlock done using C:\Users\Petter\AppData\Roaming\npm-cache_locks\msgpack-68ee4676dba95d81.lock for C:\Users\Petter\node_modules\msgpack
251 verbose stack Error: [email protected] install: node-gyp rebuild
251 verbose stack Exit status 1
251 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:214:16)
251 verbose stack at emitTwo (events.js:87:13)
251 verbose stack at EventEmitter.emit (events.js:172:7)
251 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
251 verbose stack at emitTwo (events.js:87:13)
251 verbose stack at ChildProcess.emit (events.js:172:7)
251 verbose stack at maybeClose (internal/child_process.js:821:16)
251 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
252 verbose pkgid [email protected]
253 verbose cwd C:\Users\Petter
254 error Windows_NT 10.0.10240
255 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "msgpack"
256 error node v4.2.6
257 error npm v2.14.12
258 error code ELIFECYCLE
259 error [email protected] install: node-gyp rebuild
259 error Exit status 1
260 error Failed at the [email protected] install script 'node-gyp rebuild'.
260 error This is most likely a problem with the msgpack package,
260 error not with npm itself.
260 error Tell the author that this fails on your system:
260 error node-gyp rebuild
260 error You can get their info via:
260 error npm owner ls msgpack
260 error There is likely additional logging output above.
261 verbose exit [ 1, true ]
262 verbose unbuild node_modules\msgpack
263 info preuninstall [email protected]
264 info uninstall [email protected]
265 verbose unbuild rmStuff [email protected] from C:\Users\Petter\node_modules
266 silly gentlyRm C:\Users\Petter\node_modules.bin\json2msgpack.cmd is being gently removed
267 silly gentlyRm verifying C:\Users\Petter is an npm working directory
268 silly gentlyRm C:\Users\Petter\node_modules.bin\msgpack2json.cmd is being gently removed
269 silly gentlyRm verifying C:\Users\Petter is an npm working directory
270 silly gentlyRm containing path C:\Users\Petter is under npm's control, in C:\Users\Petter
271 silly gentlyRm deletion target C:\Users\Petter\node_modules.bin\json2msgpack.cmd is under C:\Users\Petter
272 verbose gentlyRm vacuuming from C:\Users\Petter\node_modules.bin\json2msgpack.cmd up to C:\Users\Petter
273 silly gentlyRm containing path C:\Users\Petter is under npm's control, in C:\Users\Petter
274 silly gentlyRm deletion target C:\Users\Petter\node_modules.bin\msgpack2json.cmd is under C:\Users\Petter
275 verbose gentlyRm vacuuming from C:\Users\Petter\node_modules.bin\msgpack2json.cmd up to C:\Users\Petter
276 silly vacuum-fs removing C:\Users\Petter\node_modules.bin\json2msgpack.cmd
277 silly vacuum-fs removing C:\Users\Petter\node_modules.bin\msgpack2json.cmd
278 silly vacuum-fs quitting because other entries in C:\Users\Petter\node_modules.bin
279 silly gentlyRm C:\Users\Petter\node_modules.bin\json2msgpack is being gently removed
280 silly gentlyRm verifying C:\Users\Petter is an npm working directory
281 silly gentlyRm containing path C:\Users\Petter is under npm's control, in C:\Users\Petter
282 silly gentlyRm deletion target C:\Users\Petter\node_modules.bin\json2msgpack is under C:\Users\Petter
283 verbose gentlyRm vacuuming from C:\Users\Petter\node_modules.bin\json2msgpack up to C:\Users\Petter
284 silly vacuum-fs quitting because other entries in C:\Users\Petter\node_modules.bin
285 silly gentlyRm C:\Users\Petter\node_modules.bin\msgpack2json is being gently removed
286 silly gentlyRm verifying C:\Users\Petter is an npm working directory
287 silly gentlyRm containing path C:\Users\Petter is under npm's control, in C:\Users\Petter
288 silly gentlyRm deletion target C:\Users\Petter\node_modules.bin\msgpack2json is under C:\Users\Petter
289 verbose gentlyRm vacuuming from C:\Users\Petter\node_modules.bin\msgpack2json up to C:\Users\Petter
290 silly vacuum-fs removing C:\Users\Petter\node_modules.bin\json2msgpack
291 silly vacuum-fs removing C:\Users\Petter\node_modules.bin\msgpack2json
292 silly vacuum-fs removing C:\Users\Petter\node_modules.bin
293 silly vacuum-fs removing C:\Users\Petter\node_modules.bin
294 silly vacuum-fs quitting because other entries in C:\Users\Petter\node_modules
295 silly vacuum-fs quitting because other entries in C:\Users\Petter\node_modules
296 info postuninstall [email protected]
297 silly gentlyRm C:\Users\Petter\node_modules\msgpack is being purged from base C:\Users\Petter
298 verbose gentlyRm don't care about contents; nuking C:\Users\Petter\node_modules\msgpack
299 silly vacuum-fs purging C:\Users\Petter\node_modules\msgpack
300 silly vacuum-fs quitting because other entries in C:\Users\Petter\node_modules

64-bit number encoding/decoding in msgpack does not work

Due to the limitation of javascript the way numbers are store, 64 bit integers can not represented correctly.

msgpack decodes a 64 bit number as ordinary javascript numeric type which is incorrect and looses precision.

n = "18446464814936021036"
x = [ 0xcf, 0xff, 0xff, 0x02, 0x04, 0x00, 0x00, 0xd8, 0x2c ]
a = msgpack.unpack(x)
a == 1844646481493602000 // not equal to n

unittest for this is incorrect too.

Need an alternate way to encode/decode 64 bit numbers to/from msgpack format

No Makefile

Manual build instructions say to use make but the repository does not include a Makefile. I'm on a system where I'm stuck with node 0.6.6, which does not come with npm, nor is npm available separately, so manual build is really my only option.

serializing an object with > 32 levels of nesting fails to work

The code below reproduces the issue:

var msgpack = require('msgpack')

var b = {};
var buf = b;

for (i = 0; i < 32; i++) {
  b.h = i;
  b.level = {}
  b = b.level;
}

var packed = msgpack.pack(buf);
var unpacked = msgpack.unpack(packed);
console.log("unpacked:", JSON.stringify(unpacked));

Error you get is:

 test $ node breaks.js                                                                                                                  ~/src/test 1 ↵

/Users/jandre/src/test/breaks.js:13
var unpacked = msgpack.unpack(packed);
                       ^
Error: Error de-serializing object
    at Object.<anonymous> (/Users/jandre/src/test/breaks.js:13:24)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback (node.js:245:9)

it's reporting a msgpack parse eror (-1).

When you change it to 31 levels of nesting, it works fine

var msgpack = require('msgpack')

var b = {};
var buf = b;

for (i = 0; i < 31; i++) {
  b.h = i;
  b.level = {}
  b = b.level;
}

var packed = msgpack.pack(buf);
var unpacked = msgpack.unpack(packed);
console.log("unpacked:", JSON.stringify(unpacked))

Fix up msgpack.Stream and tests

tests/test-stream.js and tests/test-stream-disjoint.js are outdated.

Perhaps it's time to change all of msgpack.Stream over to new node 0.10.x Streams.

Optinally wrap msgpack_object instead of converting to V8 object

Currently msgpack.unpack(), converts the msgpack_object from C/C++ lib into a V8 object visiting the msgpack_object entirely with recursion.
Such an approach is known to be ~ 3.5 times slower than JSON.parse(). I could get approximately the same performance on nodejs 7.5 with msgpack 1.0.2.

In msgpack.cc, the recursive implementation of msgpack_to_v8 repeatedly calls Nan::New.
Building the V8 object is the most expensive part and disabling V8 object creation (C library msgpack_unpack) still being called, I could get encouraging numbers:

json: 723.140ms msgpack: 458.431ms

median out of 10 runs of:

console.time('json');
var sj = JSON.stringify(data);
for (let i = 0; i < 500000; i++) {
    JSON.parse(sj);
}
console.timeEnd('json');
var sj = msgpack.pack(data);
console.time('msgpack');
for (let i = 0; i < 500000; i++) {
    msgpack.unpack(sj);
}
console.timeEnd('msgpack');

suggesting that most of the time is spent to build a V8 object.

In some use cases where the full object is not needed or not repeatedly accessed, better performance could be achieved wrapping the msgpack_object struct within a V8 object with getters of computed property names (not sure how transparent that can be).

If an msgpack_object representing:

var o = {"a" : 1, "b" : 2, "c" : [1, 2, 3]};

is given, o.c[1] only creates and returns a number instead of the full object structure.
Assumption is to have less overhead and performance comparable to direct use of C library.
Was this ever tried? Does it make sense at all?

Install with Node v0.10.24

Error for install msgpack on ubuntu 12.4 + Node v0.10.24

''''
sudo npm install msgpack -g
/usr/bin/json2msgpack -> /usr/lib/node_modules/msgpack/bin/json2msgpack
/usr/bin/msgpack2json -> /usr/lib/node_modules/msgpack/bin/msgpack2json

[email protected] install /usr/lib/node_modules/msgpack
node-gyp rebuild

gyp http GET http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz
gyp http 200 http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: EPERM, utime '/home/ubuntu/.node-gyp/0.10.24'
gyp ERR! System Linux 3.2.0-57-virtual
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/msgpack
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v0.12.1
gyp ERR! This is a bug in node-gyp.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR! https://github.com/TooTallNate/node-gyp/issues
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the msgpack 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 msgpack
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.2.0-57-virtual
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "msgpack" "-g"
npm ERR! cwd /usr/local/MYPROJ/node/node.js
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /usr/local/MYPROJ/node/node.js/npm-debug.log
npm ERR! not ok code 0
''''

electron-rebuild and g++ issue

I using electron and when I run electron-rebuild command it shows such error:

  CXX(target) Release/obj.target/msgpackBinding/src/msgpack.o                                                                                                                                              
In file included from /home/pi/.electron-gyp/11.2.3/include/node/v8.h:30,                                                                                                                                  
                 from ../src/msgpack.cc:1:                                                                                                                                                                 
/home/pi/.electron-gyp/11.2.3/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:                                                                                           
/home/pi/.electron-gyp/11.2.3/include/node/v8-internal.h:418:38: error: ‘remove_cv_t’ is not a member of ‘std’                                                                                             
             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);                                                                                                                              
                                      ^~~~~~~~~~~                                                                                                                                                          
/home/pi/.electron-gyp/11.2.3/include/node/v8-internal.h:418:38: note: suggested alternative: ‘remove_cv’                                                                                                  
             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);                                                                                                                              
                                      ^~~~~~~~~~~                                                                                                                                                          
                                      remove_cv                                                                                                                                                            
/home/pi/.electron-gyp/11.2.3/include/node/v8-internal.h:418:38: error: ‘remove_cv_t’ is not a member of ‘std’                                                                                             
/home/pi/.electron-gyp/11.2.3/include/node/v8-internal.h:418:38: note: suggested alternative: ‘remove_cv’                                                                                                  
             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);                                                                                                                              
                                      ^~~~~~~~~~~                                                                                                                                                          
                                      remove_cv                                                                                                                                                            
/home/pi/.electron-gyp/11.2.3/include/node/v8-internal.h:418:50: error: template argument 2 is invalid                                                                                                     
             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);                                                                                                                              
                                                  ^                                                                                                                                                        
/home/pi/.electron-gyp/11.2.3/include/node/v8-internal.h:418:63: error: ‘::Perform’ has not been declared                                                                                                  
             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);                                                                                                                              
                                                               ^~~~~~~                                                                                                                                     
/home/pi/.electron-gyp/11.2.3/include/node/v8-internal.h:418:63: note: suggested alternative: ‘perror’                                                                                                     
             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);                                                                                                                              
                                                               ^~~~~~~                                                                                                                                     
                                                               perror

This issue appears because we have -std=c++11 flag in binding.gyp file:

            'cflags_cc': [
                    '-Wall',
                    '-O3',
                    '-std=c++11',
                ],

Changing this flag to -std=c++14 or removing it fixes the issue.

I am working on linux with gcc-8.

thread error: Error: Module did not self-register

The following erro occurred when i use msgpack in worker-thread

[2023-06-09T15:59:10.621] [ERROR] default - thread error: Error: Module did not self-register: 'xxxxxx\node_modules\msgpack\build\Release\msgpackBinding.node'.
    at Module._extensions..node (node:internal/modules/cjs/loader:1338:18)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)       
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (H:\company\sg2\tsgf\node_modules\msgpack\lib\msgpack.js:6:14)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)      
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12) {        
  code: 'ERR_DLOPEN_FAILED'
}

failed to install on node 0.10.32

I have use npm install msgpack, and failed:

/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional: In static member function ‘static bool std::tr1::_Function_base::_Base_manager<_Functor>::_M_manager(std::tr1::_Any_data&, const std::tr1::_Any_data&, std::tr1::_Manager_operation)’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional:904: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional: In static member function ‘static bool std::tr1::_Function_base::_Ref_manager<_Functor>::_M_manager(std::tr1::_Any_data&, const std::tr1::_Any_data&, std::tr1::_Manager_operation)’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional:982: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In static member function ‘static bool std::tr1::_Function_handler<void ()(), _Member _Class::>::_M_manager(std::tr1::_Any_data&, const std::tr1::_Any_data&, std::tr1::_Manager_operation)’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:572: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘const std::type_info& std::tr1::function<_Res ()()>::target_type() const’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:883: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘_Functor* std::tr1::function<_Res ()()>::target()’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:892: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘const _Functor* std::tr1::function<_Res ()()>::target() const’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:912: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In static member function ‘static bool std::tr1::_Function_handler<void ()(_T1), _Member _Class::
>::_M_manager(std::tr1::_Any_data&, const std::tr1::_Any_data&, std::tr1::_Manager_operation)’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:572: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘const std::type_info& std::tr1::function<_Res ()(_T1)>::target_type() const’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:883: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘_Functor* std::tr1::function<_Res ()(_T1)>::target()’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:892: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘const _Functor* std::tr1::function<_Res ()(_T1)>::target() const’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:912: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In static member function ‘static bool std::tr1::_Function_handler<void ()(_T1, _T2), _Member _Class::>::_M_manager(std::tr1::_Any_data&, const std::tr1::_Any_data&, std::tr1::_Manager_operation)’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:572: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘const std::type_info& std::tr1::function<_Res ()(_T1, _T2)>::target_type() const’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:883: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘_Functor* std::tr1::function<_Res ()(_T1, _T2)>::target()’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:892: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘const _Functor* std::tr1::function<_Res ()(_T1, _T2)>::target() const’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:912: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In static member function ‘static bool std::tr1::_Function_handler<void ()(_T1, _T2, _T3), _Member _Class::
>::_M_manager(std::tr1::_Any_data&, const std::tr1::_Any_data&, std::tr1::_Manager_operation)’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:572: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘const std::type_info& std::tr1::function<_Res ()(_T1, _T2, _T3)>::target_type() const’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:883: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘_Functor* std::tr1::function<_Res ()(_T1, _T2, _T3)>::target()’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:892: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘const _Functor* std::tr1::function<_Res ()(_T1, _T2, _T3)>::target() const’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:912: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In static member function ‘static bool std::tr1::_Function_handler<void ()(_T1, _T2, _T3, _T4), _Member _Class::>::_M_manager(std::tr1::_Any_data&, const std::tr1::_Any_data&, std::tr1::_Manager_operation)’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:572: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘const std::type_info& std::tr1::function<_Res ()(_T1, _T2, _T3, _T4)>::target_type() const’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:883: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘_Functor* std::tr1::function<_Res ()(_T1, _T2, _T3, _T4)>::target()’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:892: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘const _Functor* std::tr1::function<_Res ()(_T1, _T2, _T3, _T4)>::target() const’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:912: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In static member function ‘static bool std::tr1::_Function_handler<void ()(_T1, _T2, _T3, _T4, _T5), _Member _Class::
>::_M_manager(std::tr1::_Any_data&, const std::tr1::_Any_data&, std::tr1::_Manager_operation)’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:572: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘const std::type_info& std::tr1::function<_Res ()(_T1, _T2, _T3, _T4, _T5)>::target_type() const’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:883: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘_Functor* std::tr1::function<_Res ()(_T1, _T2, _T3, _T4, _T5)>::target()’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:892: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘const _Functor* std::tr1::function<_Res ()(_T1, _T2, _T3, _T4, _T5)>::target() const’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:912: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In static member function ‘static bool std::tr1::_Function_handler<void ()(_T1, _T2, _T3, _T4, _T5, _T6), _Member _Class::>::_M_manager(std::tr1::_Any_data&, const std::tr1::_Any_data&, std::tr1::_Manager_operation)’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:572: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘const std::type_info& std::tr1::function<_Res ()(_T1, _T2, _T3, _T4, _T5, _T6)>::target_type() const’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:883: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘_Functor* std::tr1::function<_Res ()(_T1, _T2, _T3, _T4, _T5, _T6)>::target()’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:892: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘const _Functor* std::tr1::function<_Res ()(_T1, _T2, _T3, _T4, _T5, _T6)>::target() const’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:912: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In static member function ‘static bool std::tr1::_Function_handler<void ()(_T1, _T2, _T3, _T4, _T5, _T6, _T7), _Member _Class::
>::_M_manager(std::tr1::_Any_data&, const std::tr1::_Any_data&, std::tr1::_Manager_operation)’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:572: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘const std::type_info& std::tr1::function<_Res ()(_T1, _T2, _T3, _T4, _T5, _T6, _T7)>::target_type() const’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:883: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘_Functor* std::tr1::function<_Res ()(_T1, _T2, _T3, _T4, _T5, _T6, _T7)>::target()’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:892: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘const _Functor* std::tr1::function<_Res ()(_T1, _T2, _T3, _T4, _T5, _T6, _T7)>::target() const’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:912: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In static member function ‘static bool std::tr1::_Function_handler<void ()(_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8), _Member _Class::>::_M_manager(std::tr1::_Any_data&, const std::tr1::_Any_data&, std::tr1::_Manager_operation)’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:572: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘const std::type_info& std::tr1::function<_Res ()(_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8)>::target_type() const’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:883: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘_Functor* std::tr1::function<_Res ()(_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8)>::target()’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:892: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘const _Functor* std::tr1::function<_Res ()(_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8)>::target() const’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:912: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In static member function ‘static bool std::tr1::_Function_handler<void ()(_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9), _Member _Class::
>::_M_manager(std::tr1::_Any_data&, const std::tr1::_Any_data&, std::tr1::_Manager_operation)’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:572: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘const std::type_info& std::tr1::function<_Res ()(_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9)>::target_type() const’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:883: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘_Functor* std::tr1::function<_Res ()(_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9)>::target()’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:892: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘const _Functor* std::tr1::function<_Res ()(_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9)>::target() const’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:912: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In static member function ‘static bool std::tr1::_Function_handler<void ()(_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10), _Member _Class::*>::_M_manager(std::tr1::_Any_data&, const std::tr1::_Any_data&, std::tr1::_Manager_operation)’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:572: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘const std::type_info& std::tr1::function<_Res ()(_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10)>::target_type() const’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:883: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘_Functor* std::tr1::function<_Res ()(_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10)>::target()’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:892: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h: In member function ‘const _Functor* std::tr1::function<_Res ()(_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10)>::target() const’:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/tr1/functional_iterate.h:912: 错误:在指定 -fno-rtti 的情况下不能使用 typeid
make: *** [Release/obj.target/libmsgpack/deps/msgpack/object.o] 错误 1
make: Leaving directory /usr/node/protojs/node_modules/msgpack/build' gyp ERR! build error gyp ERR! stack Error:make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/node/node-v0.10.32-linux-x86/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 2.6.18-400.1.1.el5
gyp ERR! command "node" "/usr/node/node-v0.10.32-linux-x86/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/node/protojs/node_modules/msgpack
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok

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 most likely a problem with the msgpack 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 msgpack
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.18-400.1.1.el5
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "msgpack"
npm ERR! cwd /usr/node/protojs
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

Update to modern NodeJS versions?

Is this library still maintained? I'm getting

module.js:681
  return process.dlopen(module, path._makeLong(filename));
                 ^

Error: The module '/home/ubuntu/stardust-backend/node_modules/msgpack/build/Release/msgpackBinding.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 48. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).

And I don't see any commits past 2015 in this repo.

Installation fails with Python 3

I run the following:
npm install msgpack

and get:

> [email protected] install {path}\node_modules\msgpack
> node-gyp rebuild


{path}\node_modules\msgpack>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Path\To\Python\Python36\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                                ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:276:12)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at maybeClose (internal/child_process.js:915:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd {path}\node_modules\msgpack
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN photo-manager-fileserver No repository field.
npm WARN photo-manager-fileserver No license field.

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!     {APPDATA}\npm-cache\_logs\2018-11-10T15_28_49_571Z-debug.log

Because I have Python 3.6 in my PATH, it attempts to use that to run a command which is designed for Python 2, so it fails to install.

I then ran the following:

set PATH=C:\Python27;C:\Program Files\nodejs
npm install --save msgpack

...and the installation worked fine. However, this step shouldn't be necessary, and I wouldn't have thought that having Python 3 in the PATH was such an unusual circumstance.

I don't know enough about NPM packaging to understand where the problem is (or how it might be fixed) but this seemed like the best place to post this issue.

Node JS 0.10.37 compatibility

Hi there,

I'm trying to build [email protected] for zerorpc and it fails with ELIFECYCLE error from npm. What are the compatible versions with nodejs 0.10.37. If there are multiple compatibilty issues, then a compatibility table would be a nice documentation improvement. Thanks

npm install issue

Hi,

Since the last version upgrade a couple of hours back, I am seeing the below issue

CXX(target) Release/obj.target/libmsgpack/deps/msgpack/object.o
cc1plus: error: unrecognized command line option "-all"
make: *** [Release/obj.target/libmsgpack/deps/msgpack/object.o] Error 1

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! sh "-c" "node-gyp rebuild" failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the msgpack package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild

Failed at the [email protected] install script

when i install msgpack with node 0.11.12,there is so many errors occured ,just like below:

[email protected] install /Users/wangjianhua/project/upyun/nodejs/Alvida/node_modules/memcached/node_modules/hashring
node-gyp rebuild

CXX(target) Release/obj.target/hashvalue/src/hashvalue.o
In file included from ../src/hashvalue.cc:1:
../node_modules/nan/nan.h:189:74: error: too many arguments to function call, expected at most 3, have 4
return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
~~~~~~~~~~~~~~~~~~ ^~~~
/Users/wangjianhua/.node-gyp/0.11.12/deps/v8/include/v8.h:3585:3: note: 'New' declared here
static Local New(Handle receiver =
^
In file included from ../src/hashvalue.cc:1:
../node_modules/nan/nan.h:217:27: error: cannot initialize a parameter of type 'int' with an rvalue of type 'v8::Isolate '
return v8::Array::New(v8::Isolate::GetCurrent());
^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/wangjianhua/.node-gyp/0.11.12/deps/v8/include/v8.h:2335:31: note: passing argument to parameter 'length' here
static Local New(int length = 0);
^
In file included from ../src/hashvalue.cc:1:
../node_modules/nan/nan.h:222:54: error: too many arguments to function call, expected at most single argument 'length', have 2 arguments
return v8::Array::New(v8::Isolate::GetCurrent(), length);
~~~~~~~~~~~~~~ ^~~~~~
/Users/wangjianhua/.node-gyp/0.11.12/deps/v8/include/v8.h:2335:3: note: 'New' declared here
static Local New(int length = 0);
^
In file included from ../src/hashvalue.cc:1:
../node_modules/nan/nan.h:227:53: error: too many arguments to function call, expected single argument 'time', have 2 arguments
return v8::Date::New(v8::Isolate::GetCurrent(), time).Asv8::Date();
~~~~~~~~~~~~~ ^~~~
/Users/wangjianhua/.node-gyp/0.11.12/deps/v8/include/v8.h:2866:3: note: 'New' declared here
static Local New(double time);
^
In file included from ../src/hashvalue.cc:1:
../node_modules/nan/nan.h:227:70: error: expected '(' for function-style cast or type construction
return v8::Date::New(v8::Isolate::GetCurrent(), time).Asv8::Date();
~~~~~~~~^
../node_modules/nan/nan.h:227:72: error: expected expression
return v8::Date::New(v8::Isolate::GetCurrent(), time).Asv8::Date();
^
../node_modules/nan/nan.h:232:53: error: too many arguments to function call, expected single argument 'time', have 2 arguments
return v8::Date::New(v8::Isolate::GetCurrent(), time).Asv8::Date();
~~~~~~~~~~~~~ ^~~~
/Users/wangjianhua/.node-gyp/0.11.12/deps/v8/include/v8.h:2866:3: note: 'New' declared here
static Local New(double time);
^
In file included from ../src/hashvalue.cc:1:
../node_modules/nan/nan.h:232:70: error: expected '(' for function-style cast or type construction
return v8::Date::New(v8::Isolate::GetCurrent(), time).Asv8::Date();
~~~~~~~~^
../node_modules/nan/nan.h:232:72: error: expected expression
return v8::Date::New(v8::Isolate::GetCurrent(), time).Asv8::Date();
^
../node_modules/nan/nan.h:235:15: error: no type named 'UnboundScript' in namespace 'v8'
typedef v8::UnboundScript NanUnboundScript;
~~~~^
../node_modules/nan/nan.h:243:9: error: no member named 'ScriptCompiler' in namespace 'v8'
v8::ScriptCompiler::Source source(s, origin);
~~~~^
../node_modules/nan/nan.h:244:16: error: no member named 'ScriptCompiler' in namespace 'v8'
return v8::ScriptCompiler::CompileUnbound(
~~~~^
../node_modules/nan/nan.h:245:37: error: use of undeclared identifier 'source'; did you mean 'v8::Extension::source'?
v8::Isolate::GetCurrent(), &source);
^~~~~~
v8::Extension::source
/Users/wangjianhua/.node-gyp/0.11.12/deps/v8/include/v8.h:3712:46: note: 'v8::Extension::source' declared here
const String::ExternalAsciiStringResource
source() const {
^
In file included from ../src/hashvalue.cc:1:
../node_modules/nan/nan.h:245:36: error: must explicitly qualify name of member function when taking its address
v8::Isolate::GetCurrent(), &source);
^~~~~~~
Extension::
../node_modules/nan/nan.h:252:9: error: no member named 'ScriptCompiler' in namespace 'v8'
v8::ScriptCompiler::Source source(s);
~~~~^
../node_modules/nan/nan.h:253:16: error: no member named 'ScriptCompiler' in namespace 'v8'
return v8::ScriptCompiler::CompileUnbound(
~~~~^
../node_modules/nan/nan.h:254:37: error: use of undeclared identifier 'source'; did you mean 'v8::Extension::source'?
v8::Isolate::GetCurrent(), &source);
^~~~~~
v8::Extension::source
/Users/wangjianhua/.node-gyp/0.11.12/deps/v8/include/v8.h:3712:46: note: 'v8::Extension::source' declared here
const String::ExternalAsciiStringResource* source() const {
^
In file included from ../src/hashvalue.cc:1:
../node_modules/nan/nan.h:254:36: error: must explicitly qualify name of member function when taking its address
v8::Isolate::GetCurrent(), &source);
^~~~~~~
Extension::
../node_modules/nan/nan.h:279:36: error: too many arguments to function call, expected single argument 'value', have 2 arguments
v8::Isolate::GetCurrent(), val).Asv8::NumberObject();
^~~
/Users/wangjianhua/.node-gyp/0.11.12/deps/v8/include/v8.h:2904:3: note: 'New' declared here
static Local New(double value);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/hashvalue/src/hashvalue.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/nvm/0.7.0/v0.11.12/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:107:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1045:12)
gyp ERR! System Darwin 14.0.0
gyp ERR! command "node" "/usr/local/Cellar/nvm/0.7.0/v0.11.12/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/wangjianhua/project/upyun/nodejs/Alvida/node_modules/memcached/node_modules/hashring
gyp ERR! node -v v0.11.12
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
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 most likely a problem with the msgpack 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 msgpack
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 14.0.0
npm ERR! command "/usr/local/opt/nvm/v0.11.12/bin/node" "/usr/local/opt/nvm/v0.11.12/bin/npm" "install"
npm ERR! cwd /Users/wangjianhua/project/upyun/nodejs/Alvida
npm ERR! node -v v0.11.12
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!

anyone can help me ? thx!

msgpack stream write 'drain'?

In the Stream wrapper of msgpack.js, it seems that the send function doesn't handle the underlying stream's writable.'drain' event, even though in most cases, stream.write would succeed, but for high volume data pumping scenarios, when stream.write returns false, the writable.'drain' event should be used to resume writing

Feature request: manually control type mapping

I would like to use this library in a node.js application that communicates with a msgpack API. Unfortunately, I need to be able to send messages that use specific data types for specific fields (e.g. Array<fixint>, bin8, ...) rather than have the library automatically choose/guess as described in
https://github.com/msgpack/msgpack-node#type-mapping.

How hard would it be to incorporate this? For example, I'd like to be able to do this:

// Binary data
const buff = getBufferFromSomewhere();
msgpack.pack(buff, { family: 'bin' }); // ==> chooses `bin8`, `bin16` or `bin32` depending on buffer size

// Force particular numeric type
msgpack.pack(123, { type: 'fixint' });

// Specify custom type mapping when packing arrays
const a = [{ data: Math.PI, type: 'float64' }, { data: 3.14, type: 'float32' }];
msgpack.pack(a, {
  interpret(item) {
    return {
      data: item.data,
      type: item.type,
      // alternatively:
      family: item.family,
    };
  }
});

Plans to support Node < 4?

Changes made while updating nan broke support for older versions of node, are there any plans to fix?

Results trying to install with node-0.12.7:

npm WARN excluding symbolic link deps/ejs/node_modules/.bin/expresso -> ../expresso/bin/expresso
npm WARN excluding symbolic link deps/ejs/node_modules/.bin/node-jscoverage -> ../expresso/deps/jscoverage/node-jscoverage
npm WARN excluding symbolic link node_modules/.bin/tap -> ../tap/bin/tap.js
npm WARN excluding symbolic link node_modules/.bin/uglifyjs -> ../uglify-js/bin/uglifyjs
npm WARN excluding symbolic link node_modules/tap/node_modules/.bin/nopt -> ../nopt/bin/nopt.js
npm WARN excluding symbolic link node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/.bin/uglifyjs -> ../uglify-js/bin/uglifyjs
npm WARN excluding symbolic link deps/ejs/node_modules/.bin/expresso -> ../expresso/bin/expresso
npm WARN excluding symbolic link deps/ejs/node_modules/.bin/node-jscoverage -> ../expresso/deps/jscoverage/node-jscoverage
npm WARN excluding symbolic link node_modules/.bin/tap -> ../tap/bin/tap.js
npm WARN excluding symbolic link node_modules/.bin/uglifyjs -> ../uglify-js/bin/uglifyjs
npm WARN excluding symbolic link node_modules/tap/node_modules/.bin/nopt -> ../nopt/bin/nopt.js
npm WARN excluding symbolic link node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/.bin/uglifyjs -> ../uglify-js/bin/uglifyjs

> [email protected] install /Users/zjr/Projects/msgpack-node
> node-gyp rebuild

  CC(target) Release/obj.target/libmsgpack/deps/msgpack/objectc.o
  CC(target) Release/obj.target/libmsgpack/deps/msgpack/unpack.o
  CC(target) Release/obj.target/libmsgpack/deps/msgpack/vrefbuffer.o
  CC(target) Release/obj.target/libmsgpack/deps/msgpack/zone.o
  CC(target) Release/obj.target/libmsgpack/deps/msgpack/version.o
  LIBTOOL-STATIC Release/msgpack.a
  CXX(target) Release/obj.target/msgpackBinding/src/msgpack.o
../src/msgpack.cc:126:79: warning: use of enumeration in a nested name specifier is a C++11 extension
      [-Wc++11-extensions]
        mo->via.str.size = static_cast<uint32_t>(Nan::DecodeBytes(v8obj, Nan::Encoding::UTF8));
                                                                              ^
../src/msgpack.cc:129:80: warning: use of enumeration in a nested name specifier is a C++11 extension
      [-Wc++11-extensions]
        Nan::DecodeWrite((char*)mo->via.str.ptr, mo->via.str.size, v8obj, Nan::Encoding::UTF8);
                                                                               ^
../src/msgpack.cc:136:80: warning: use of enumeration in a nested name specifier is a C++11 extension
      [-Wc++11-extensions]
        mo->via.str.size = static_cast<uint32_t>(Nan::DecodeBytes(result, Nan::Encoding::UTF8));
                                                                               ^
../src/msgpack.cc:139:81: warning: use of enumeration in a nested name specifier is a C++11 extension
      [-Wc++11-extensions]
        Nan::DecodeWrite((char*)mo->via.str.ptr, mo->via.str.size, result, Nan::Encoding::UTF8);
                                                                                ^
../src/msgpack.cc:281:20: error: call to 'ThrowError' is ambiguous
            return Nan::ThrowError(e.getThrownException());
                   ^~~~~~~~~~~~~~~
../node_modules/nan/nan.h:639:3: note: candidate function
  X(Error)
  ^
../node_modules/nan/nan.h:633:21: note: expanded from macro 'X'
    NAN_INLINE void Throw ## NAME(v8::Local<v8::String> msg) {                 \
                    ^
<scratch space>:41:1: note: expanded from here
ThrowError
^
../node_modules/nan/nan.h:647:19: note: candidate function
  NAN_INLINE void ThrowError(v8::Local<v8::Value> error) {
                  ^
../src/msgpack.cc:322:42: error: no matching member function for call to 'Set'
            return info.GetReturnValue().Set(msgpack_to_v8(&mo));
                   ~~~~~~~~~~~~~~~~~~~~~~^~~
../node_modules/nan/nan_callbacks_12_inl.h:46:15: note: candidate function not viable: no known conversion from
      'Handle<v8::Value>' to 'bool' for 1st argument
  inline void Set(bool value) {
              ^
../node_modules/nan/nan_callbacks_12_inl.h:51:15: note: candidate function not viable: no known conversion from
      'Handle<v8::Value>' to 'double' for 1st argument
  inline void Set(double i) {
              ^
../node_modules/nan/nan_callbacks_12_inl.h:56:15: note: candidate function not viable: no known conversion from
      'Handle<v8::Value>' to 'int32_t' (aka 'int') for 1st argument
  inline void Set(int32_t i) {
              ^
../node_modules/nan/nan_callbacks_12_inl.h:61:15: note: candidate function not viable: no known conversion from
      'Handle<v8::Value>' to 'uint32_t' (aka 'unsigned int') for 1st argument
  inline void Set(uint32_t i) {
              ^
../node_modules/nan/nan_callbacks_12_inl.h:27:37: note: candidate template ignored: could not match 'Local' against
      'Handle'
  template <typename S> inline void Set(const v8::Local<S> &handle) {
                                    ^
../node_modules/nan/nan_callbacks_12_inl.h:32:37: note: candidate template ignored: could not match 'Global' against
      'Handle'
  template <typename S> inline void Set(const Global<S> &handle) {
                                    ^
../node_modules/nan/nan_callbacks_12_inl.h:89:15: note: candidate template ignored: could not match 'S *' against
      'Handle<v8::Value>'
  inline void Set(S *whatever) { TYPE_CHECK(S*, v8::Primitive); }
              ^
../src/msgpack.cc:324:20: error: call to 'ThrowError' is ambiguous
            return Nan::ThrowError(e.getThrownException());
                   ^~~~~~~~~~~~~~~
../node_modules/nan/nan.h:639:3: note: candidate function
  X(Error)
  ^
../node_modules/nan/nan.h:633:21: note: expanded from macro 'X'
    NAN_INLINE void Throw ## NAME(v8::Local<v8::String> msg) {                 \
                    ^
<scratch space>:41:1: note: expanded from here
ThrowError
^
../node_modules/nan/nan.h:647:19: note: candidate function
  NAN_INLINE void ThrowError(v8::Local<v8::Value> error) {
                  ^
4 warnings and 3 errors generated.
make: *** [Release/obj.target/msgpackBinding/src/msgpack.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/zjr/.nvm/versions/node/v0.12.7/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "node" "/Users/zjr/.nvm/versions/node/v0.12.7/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/zjr/Projects/msgpack-node
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v3.0.1
gyp ERR! not ok

npm WARN EPACKAGEJSON [email protected] No license field.
npm ERR! Darwin 14.5.0
npm ERR! argv "node" "/Users/zjr/.nvm/versions/node/v0.12.7/bin/npm" "install"
npm ERR! node v0.12.7
npm ERR! npm  v3.3.3
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 msgpack 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 msgpack
npm ERR! There is likely additional logging output above.

Failed to build with v0.11.11

Just a early warning before v0.12.x

> [email protected] install /Users/hden/Documents/development/node-serf/node_modules/msgpack
> node-gyp rebuild

gyp http GET http://nodejs.org/dist/v0.11.11/node-v0.11.11.tar.gz
gyp http 200 http://nodejs.org/dist/v0.11.11/node-v0.11.11.tar.gz
  CXX(target) Release/obj.target/libmsgpack/deps/msgpack/gcc_atomic.o
  CXX(target) Release/obj.target/libmsgpack/deps/msgpack/object.o
  CC(target) Release/obj.target/libmsgpack/deps/msgpack/objectc.o
  CC(target) Release/obj.target/libmsgpack/deps/msgpack/unpack.o
  CC(target) Release/obj.target/libmsgpack/deps/msgpack/vrefbuffer.o
  CC(target) Release/obj.target/libmsgpack/deps/msgpack/zone.o
  CC(target) Release/obj.target/libmsgpack/deps/msgpack/version.o
  LIBTOOL-STATIC Release/msgpack.a
  CXX(target) Release/obj.target/msgpackBinding/src/msgpack.o
In file included from ../src/msgpack.cc:4:
In file included from ../deps/msgpack/msgpack.h:23:
In file included from ../deps/msgpack/msgpack/object.h:21:
In file included from ../deps/msgpack/msgpack/zone.h:21:
In file included from ../deps/msgpack/msgpack/sysdep.h:65:
In file included from /usr/include/arpa/inet.h:71:
/usr/include/netinet/in.h:302:2: error: unknown type name 'in_addr_t'; did you
      mean 'node::in_addr_t'?
        in_addr_t s_addr;
        ^
/usr/include/sys/_types/_in_addr_t.h:30:20: note: 'node::in_addr_t' declared
      here
typedef __uint32_t      in_addr_t;      /* base type for internet address */
                        ^
In file included from ../src/msgpack.cc:4:
In file included from ../deps/msgpack/msgpack.h:23:
In file included from ../deps/msgpack/msgpack/object.h:21:
In file included from ../deps/msgpack/msgpack/zone.h:21:
In file included from ../deps/msgpack/msgpack/sysdep.h:65:
In file included from /usr/include/arpa/inet.h:71:
/usr/include/netinet/in.h:377:2: error: unknown type name 'in_port_t'; did you
      mean 'node::in_port_t'?
        in_port_t       sin_port;
        ^
/usr/include/sys/_types/_in_port_t.h:30:21: note: 'node::in_port_t' declared
      here
typedef __uint16_t              in_port_t;
                                ^
In file included from ../src/msgpack.cc:4:
In file included from ../deps/msgpack/msgpack.h:23:
In file included from ../deps/msgpack/msgpack/object.h:21:
In file included from ../deps/msgpack/msgpack/zone.h:21:
In file included from ../deps/msgpack/msgpack/sysdep.h:65:
In file included from /usr/include/arpa/inet.h:71:
In file included from /usr/include/netinet/in.h:654:
/usr/include/netinet6/in6.h:173:2: error: unknown type name 'in_port_t'; did you
      mean 'node::in_port_t'?
        in_port_t       sin6_port;      /* Transport layer port # (in_port_t) */
        ^
/usr/include/sys/_types/_in_port_t.h:30:21: note: 'node::in_port_t' declared
      here
typedef __uint16_t              in_port_t;
                                ^
In file included from ../src/msgpack.cc:4:
In file included from ../deps/msgpack/msgpack.h:23:
In file included from ../deps/msgpack/msgpack/object.h:21:
In file included from ../deps/msgpack/msgpack/zone.h:21:
In file included from ../deps/msgpack/msgpack/sysdep.h:65:
/usr/include/arpa/inet.h:75:1: error: unknown type name 'in_addr_t'; did you
      mean 'node::in_addr_t'?
in_addr_t        inet_addr(const char *);
^
/usr/include/sys/_types/_in_addr_t.h:30:20: note: 'node::in_addr_t' declared
      here
typedef __uint32_t      in_addr_t;      /* base type for internet address */
                        ^
In file included from ../src/msgpack.cc:4:
In file included from ../deps/msgpack/msgpack.h:23:
In file included from ../deps/msgpack/msgpack/object.h:21:
In file included from ../deps/msgpack/msgpack/zone.h:21:
In file included from ../deps/msgpack/msgpack/sysdep.h:65:
/usr/include/arpa/inet.h:84:1: error: unknown type name 'in_addr_t'; did you
      mean 'node::in_addr_t'?
in_addr_t        inet_lnaof(struct in_addr);
^
/usr/include/sys/_types/_in_addr_t.h:30:20: note: 'node::in_addr_t' declared
      here
typedef __uint32_t      in_addr_t;      /* base type for internet address */
                        ^
In file included from ../src/msgpack.cc:4:
In file included from ../deps/msgpack/msgpack.h:23:
In file included from ../deps/msgpack/msgpack/object.h:21:
In file included from ../deps/msgpack/msgpack/zone.h:21:
In file included from ../deps/msgpack/msgpack/sysdep.h:65:
/usr/include/arpa/inet.h:85:31: error: unknown type name 'in_addr_t'; did you
      mean 'node::in_addr_t'?
struct in_addr   inet_makeaddr(in_addr_t, in_addr_t);
                               ^
/usr/include/sys/_types/_in_addr_t.h:30:20: note: 'node::in_addr_t' declared
      here
typedef __uint32_t      in_addr_t;      /* base type for internet address */
                        ^
In file included from ../src/msgpack.cc:4:
In file included from ../deps/msgpack/msgpack.h:23:
In file included from ../deps/msgpack/msgpack/object.h:21:
In file included from ../deps/msgpack/msgpack/zone.h:21:
In file included from ../deps/msgpack/msgpack/sysdep.h:65:
/usr/include/arpa/inet.h:85:42: error: unknown type name 'in_addr_t'; did you
      mean 'node::in_addr_t'?
struct in_addr   inet_makeaddr(in_addr_t, in_addr_t);
                                          ^
/usr/include/sys/_types/_in_addr_t.h:30:20: note: 'node::in_addr_t' declared
      here
typedef __uint32_t      in_addr_t;      /* base type for internet address */
                        ^
In file included from ../src/msgpack.cc:4:
In file included from ../deps/msgpack/msgpack.h:23:
In file included from ../deps/msgpack/msgpack/object.h:21:
In file included from ../deps/msgpack/msgpack/zone.h:21:
In file included from ../deps/msgpack/msgpack/sysdep.h:65:
/usr/include/arpa/inet.h:86:1: error: unknown type name 'in_addr_t'; did you
      mean 'node::in_addr_t'?
in_addr_t        inet_netof(struct in_addr);
^
/usr/include/sys/_types/_in_addr_t.h:30:20: note: 'node::in_addr_t' declared
      here
typedef __uint32_t      in_addr_t;      /* base type for internet address */
                        ^
In file included from ../src/msgpack.cc:4:
In file included from ../deps/msgpack/msgpack.h:23:
In file included from ../deps/msgpack/msgpack/object.h:21:
In file included from ../deps/msgpack/msgpack/zone.h:21:
In file included from ../deps/msgpack/msgpack/sysdep.h:65:
/usr/include/arpa/inet.h:87:1: error: unknown type name 'in_addr_t'; did you
      mean 'node::in_addr_t'?
in_addr_t        inet_network(const char *);
^
/usr/include/sys/_types/_in_addr_t.h:30:20: note: 'node::in_addr_t' declared
      here
typedef __uint32_t      in_addr_t;      /* base type for internet address */
                        ^
In file included from ../src/msgpack.cc:4:
In file included from ../deps/msgpack/msgpack.h:23:
In file included from ../deps/msgpack/msgpack/object.h:21:
In file included from ../deps/msgpack/msgpack/zone.h:21:
In file included from ../deps/msgpack/msgpack/sysdep.h:65:
/usr/include/arpa/inet.h:90:19: error: unknown type name 'in_addr_t'; did you
      mean 'node::in_addr_t'?
char            *inet_neta(in_addr_t, char *, __darwin_size_t);
                           ^
/usr/include/sys/_types/_in_addr_t.h:30:20: note: 'node::in_addr_t' declared
      here
typedef __uint32_t      in_addr_t;      /* base type for internet address */
                        ^
In file included from ../src/msgpack.cc:4:
In file included from ../deps/msgpack/msgpack.h:25:
In file included from ../deps/msgpack/msgpack/pack.h:21:
In file included from ../deps/msgpack/msgpack/pack_define.h:23:
/usr/include/string.h:145:1: error: unknown type name 'errno_t'; did you mean
      'node::errno_t'?
errno_t memset_s(void *, rsize_t, int, rsize_t) __OSX_AVAILABLE_STARTING...
^
/usr/include/sys/_types/_errno_t.h:30:32: note: 'node::errno_t' declared here
typedef int                    errno_t;
                               ^
In file included from ../src/msgpack.cc:4:
In file included from ../deps/msgpack/msgpack.h:25:
In file included from ../deps/msgpack/msgpack/pack.h:21:
In file included from ../deps/msgpack/msgpack/pack_define.h:23:
/usr/include/string.h:145:26: error: C++ requires a type specifier for all
      declarations
errno_t memset_s(void *, rsize_t, int, rsize_t) __OSX_AVAILABLE_STARTING...
                         ^~~~~~~
/usr/include/string.h:145:40: error: unknown type name 'rsize_t'
errno_t memset_s(void *, rsize_t, int, rsize_t) __OSX_AVAILABLE_STARTING...
                                       ^
In file included from ../src/msgpack.cc:5:
In file included from /usr/include/c++/4.2.1/cmath:49:
In file included from /usr/include/c++/4.2.1/bits/c++config.h:41:
In file included from /usr/include/c++/4.2.1/bits/os_defines.h:61:
/usr/include/unistd.h:429:33: error: unknown type name 'gid_t'
int      chown(const char *, uid_t, gid_t);
                                    ^
/usr/include/unistd.h:444:1: error: unknown type name 'gid_t'
gid_t    getegid(void);
^
/usr/include/unistd.h:446:1: error: unknown type name 'gid_t'
gid_t    getgid(void);
^
/usr/include/unistd.h:450:21: error: C++ requires a type specifier for all
      declarations
int      getgroups(int, gid_t []);
                        ^~~~~
/usr/include/unistd.h:469:13: error: unknown type name 'gid_t'
int      setgid(gid_t);
                ^
/usr/include/unistd.h:565:34: error: unknown type name 'gid_t'
int      lchown(const char *, uid_t, gid_t) __DARWIN_ALIAS(lchown);
                                     ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/msgpackBinding/src/msgpack.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/hden/.nodebrew/node/v0.11.11/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:107:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:879:12)
gyp ERR! System Darwin 13.0.0
gyp ERR! command "node" "/Users/hden/.nodebrew/node/v0.11.11/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

Decode incorrect value - {"1":0.12}

when I encode and then decode I'm not getting expected output..

let a = encode  = msgpack.encode,
	decode  = msgpack.decode;

const encodePack = encode({"1":0.12});
console.log(decode(encodePack));
//{ '1': 0.11999999731779099 }

Output -
{ '1': 0.11999999731779099 }

Expected -
{"1":0.12}

Error de-serializing object

Error while de-serialising the following package:

'\x85\xa8Coalesce\xc3\xa5Event\xa4user\xa5LTime\xcc\x01\xa4Name\xa4test\xa7Payload\xc4\x03foo'

It should be decoded to the following object:

>>> import msgpack
>>> p = '\x85\xa8Coalesce\xc3\xa5Event\xa4user\xa5LTime\xcc\x01\xa4Name\xa4test\xa7Payload\xc4\x03foo'
>>> msgpack.loads(p)
{'Coalesce': True, 'LTime': 1, 'Payload': 'foo', 'Event': 'user', 'Name': 'test'}

DefinitelyTyped for msgpack-node

I am using msgpack-node with TypeScript. so I need types file for TypeScript code so that I can import msgpack-node from TypeScript code.
https://basarat.gitbooks.io/typescript/content/docs/types/@types.html
Although, msgpack-node does not have DefinitelyTyped and there is inconsistency between npm module and DefinitelyTyped.

I also added an issued here DefinitelyTyped/DefinitelyTyped#14157
Are there any solutions for this?

unpack buffer from python's msgpack API returned unexpected '-3'

Hi authors, I would like to seek for some assistance of the following issue:

I've got a python program to packb msgpack.packb into a kafka flow and was able to consume the flow. What I did with each message is to buffer.from the message and try to unpack on the node end - instead of getting the object I got '-3' as result.

Below I wrote some logic for troubleshooting:

 19     consumer.on('message', function (message) {
 20     const buf = Buffer.from(message["value"], 'binary');
 21     console.log("=========================================================================================================================")
 22     console.log('The buffer version of the message:')
 23     console.log(buf)
 24     console.log('The unpack version of the message:')
 25     console.log(msgpack.unpack(buf))
 26     console.log('The string version of the message:')
 27     console.log(message["value"])
 28     console.log('The binary version of the message:')
 29     console.log(buf.toString('hex').match(/../g).join(' '))
 30 });

And below is what the script returns:

=========================================================================================================================
The buffer version of the message:
<Buffer fd fd 49 6e 73 74 61 6e 63 65 fd 48 4b 4f 43 47 5f 50 fd 53 65 6e 74 54 69 6d 65 fd 32 30 31 39 30 32 30 31 2d 31 30 3a 35 30 3a 30 39 2e 38 31 34 34 ... >
The unpack version of the message:
-3
The string version of the message:
��Instance�HKOCG_P�SentTime�20190201-10:50:09.814407�Severity�W�AlertMessage��HKG OCG1 [Disconnected:0 R8802:8802:8555:0:0:0 L0 S6616:6616:6616:6363:6363:6363:0]: connect(10.1.93.17:50036): Connection refused�Acked�N
The binary version of the message:
fd fd 49 6e 73 74 61 6e 63 65 fd 48 4b 4f 43 47 5f 50 fd 53 65 6e 74 54 69 6d 65 fd 32 30 31 39 30 32 30 31 2d 31 30 3a 35 30 3a 30 39 2e 38 31 34 34 30 37 fd 53 65 76 65 72 69 74 79 fd 57 fd 41 6c 65 72 74 4d 65 73 73 61 67 65 fd 00 fd 48 4b 47 20 4f 43 47 31 20 5b 44 69 73 63 6f 6e 6e 65 63 74 65 64 3a 30 20 52 38 38 30 32 3a 38 38 30 32 3a 38 35 35 35 3a 30 3a 30 3a 30 20 4c 30 20 53 36 36 31 36 3a 36 36 31 36 3a 36 36 31 36 3a 36 33 36 33 3a 36 33 36 33 3a 36 33 36 33 3a 30 5d 3a 20 63 6f 6e 6e 65 63 74 28 31 30 2e 31 2e 39 33 2e 31 37 3a 35 30 30 33 36 29 3a 20 43 6f 6e 6e 65 63 74 69 6f 6e 20 72 65 66 75 73 65 64 fd 41 63 6b 65 64 fd 4e

What is wrong during the convert in the function?
Thanks

Failed to build with Node V4.2.2

Hi. I just had a running application that use msgpack on a Node V0.12.x.

But now that I have updated my Node to V4.2.2 it can not build the msgpack

I tried [email protected], [email protected] and [email protected] and none of them work.

gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/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-68-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! project/node_modules/msgpack
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm ERR! Linux 3.13.0-68-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "[email protected]"
npm ERR! node v4.2.2
npm ERR! npm  v2.14.7
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 msgpack 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 msgpack
npm ERR! There is likely additional logging output above.

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

Any help will be really appreciated.

Unable to unpack

Hello,

In order to test whether I can "share" a session between PHP and Node.js, I decided to store sessions in memcached with msgpack:

session.save_handler=memcached
session.save_path=localhost:11211
session.serialize_handler' => 'msgpack

And when I fetch the data from memcached in Node.js, and try to unpack it, the result is a negative integer. Not an array of data, as expected. If I log the data returned from memcached, I can see that is has the same "string format" as one would get by console.log (msgpack.pack(array));.

Is there something wrong?

// data => from memcached
// data === data.toString()
console.log(typeof data); // string
console.log(data.length); // 1245

var b = new Buffer(data.length);
b.write (data, 0, 'binary');
// result: -3
console.log ("Unpacked: " + msgpack.unpack(b));

b = new Buffer(data.toString());
// result: -17
console.log( msgpack.unpack(b));

var bytes = [], i, l = data.length;
for (i = 0; i < l; ++i)
    bytes.push(data.charCodeAt(i));
// result: -3
b = new Buffer(bytes);
console.log (msgpack.unpack(b));

// works fine
var c = ['one', 'two'],
    m = msgpack.pack(c);
console.log (m.toString());
console.log(msgpack.unpack(m));

Security Issue in msgpack

Hi,

A security issue was recently disclosed to us regarding msgpack. We have sent two emails to the main contributors of this repository but have received no replies.

Please get in touch as soon as you can, as we are likely to publish this advisory in the coming weeks if we do not hear back from you.

Best,
Snyk Security Team

Failed to compile on Windows

I'm using Windows 8.1 x64.
I have Visual Studio 2013 (Ultimate), VC++ redistributable 2005, 2008, 2011, both x86 and x64.

EDIT: node version: 0.10.26, npm version: 1.4.3

When trying to npm install msgpack, I received the following errors:

c:\users\duy\code\node_modules\msgpack\deps\msgpack\msgpack\pack_template.h(716):
warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned char', possible loss of data (..\..\..\deps\msgpack\objectc.c)
[C:\Users\Duy\Code\no
de_modules\msgpack\build\deps\msgpack\libmsgpack.vcxproj]
c:\users\duy\code\node_modules\msgpack\deps\msgpack\msgpack\pack_template.h(737):
warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned char', possible loss of data (..\..\..\deps\msgpack\objectc.c)
[C:\Users\Duy\Code\no
de_modules\msgpack\build\deps\msgpack\libmsgpack.vcxproj]
c:\users\duy\code\node_modules\msgpack\deps\msgpack\msgpack\pack_template.h(773):
warning C4267: 'argument' : conversion from 'size_t' to 'unsigned int', possible loss of data (..\..\..\deps\msgpack\objectc.c)
[C:\Users\Duy\Code\node_mo
dules\msgpack\build\deps\msgpack\libmsgpack.vcxproj]
c:\users\duy\code\node_modules\msgpack\deps\msgpack\msgpack\pack_template.h(716):
warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned char', possible loss of data (..\..\..\deps\msgpack\version.c)
[C:\Users\Duy\Code\no
de_modules\msgpack\build\deps\msgpack\libmsgpack.vcxproj]
c:\users\duy\code\node_modules\msgpack\deps\msgpack\msgpack\pack_template.h(737):
warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned char', possible loss of data (..\..\..\deps\msgpack\version.c)
[C:\Users\Duy\Code\no
de_modules\msgpack\build\deps\msgpack\libmsgpack.vcxproj]
c:\users\duy\code\node_modules\msgpack\deps\msgpack\msgpack\pack_template.h(773):
warning C4267: 'argument' : conversion from 'size_t' to 'unsigned int', possible loss of data (..\..\..\deps\msgpack\version.c)
[C:\Users\Duy\Code\node_mo
dules\msgpack\build\deps\msgpack\libmsgpack.vcxproj]
c:\users\duy\code\node_modules\msgpack\deps\msgpack\msgpack\type/tr1/unordered_map.hpp(22):
fatal error C1083: Cannot open include file: 'tr1/unordered_map': No such file or directory (..\..\..\deps\msgpack\object.cpp)
[C:\Users\Duy\Cod
e\node_modules\msgpack\build\deps\msgpack\libmsgpack.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Duy\Code\node_modules\msgpack
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1

Failed to build with Node V12.4.0

Hi. I had running application that use msgpack with Node V10.15.0.
When I updated my Node to V12.4.0, it can't build the msgpack.

And this is my computer configuration:

  • System: MacOS Mojave Version 10.14.5
  • Processor 2.8GHz Intel Core i7
    Memory 16GB 1600MHz DDR3
/Users/heathcliff/.nvm/versions/node/v12.4.0/bin/json2msgpack -> /Users/heathcliff/.nvm/versions/node/v12.4.0/lib/node_modules/msgpack/bin/json2msgpack
/Users/heathcliff/.nvm/versions/node/v12.4.0/bin/msgpack2json -> /Users/heathcliff/.nvm/versions/node/v12.4.0/lib/node_modules/msgpack/bin/msgpack2json

> [email protected] install /Users/heathcliff/.nvm/versions/node/v12.4.0/lib/node_modules/msgpack
> 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
  CC(target) Release/obj.target/libmsgpack/deps/msgpack/objectc.o
  CC(target) Release/obj.target/libmsgpack/deps/msgpack/unpack.o
  CC(target) Release/obj.target/libmsgpack/deps/msgpack/vrefbuffer.o
  CC(target) Release/obj.target/libmsgpack/deps/msgpack/zone.o
  CC(target) Release/obj.target/libmsgpack/deps/msgpack/version.o
  LIBTOOL-STATIC Release/msgpack.a
  CXX(target) Release/obj.target/msgpackBinding/src/msgpack.o
../src/msgpack.cc:102:1: error: variable has incomplete type 'void'
v8_to_msgpack(Handle<Value> v8obj, msgpack_object *mo, msgpack_zone *mz, size_t depth) {
^
../src/msgpack.cc:102:15: error: use of undeclared identifier 'Handle'
v8_to_msgpack(Handle<Value> v8obj, msgpack_object *mo, msgpack_zone *mz, size_t depth) {
              ^
../src/msgpack.cc:102:22: error: 'Value' does not refer to a value
v8_to_msgpack(Handle<Value> v8obj, msgpack_object *mo, msgpack_zone *mz, size_t depth) {
                     ^
/Users/heathcliff/.node-gyp/12.4.0/include/node/v8.h:2240:17: note: declared here
class V8_EXPORT Value : public Data {
                ^
../src/msgpack.cc:102:29: error: use of undeclared identifier 'v8obj'
v8_to_msgpack(Handle<Value> v8obj, msgpack_object *mo, msgpack_zone *mz, size_t depth) {
                            ^
../src/msgpack.cc:102:36: error: unexpected type name 'msgpack_object': expected expression
v8_to_msgpack(Handle<Value> v8obj, msgpack_object *mo, msgpack_zone *mz, size_t depth) {
                                   ^
../src/msgpack.cc:102:52: error: use of undeclared identifier 'mo'
v8_to_msgpack(Handle<Value> v8obj, msgpack_object *mo, msgpack_zone *mz, size_t depth) {
                                                   ^
../src/msgpack.cc:102:56: error: unexpected type name 'msgpack_zone': expected expression
v8_to_msgpack(Handle<Value> v8obj, msgpack_object *mo, msgpack_zone *mz, size_t depth) {
                                                       ^
../src/msgpack.cc:102:70: error: use of undeclared identifier 'mz'
v8_to_msgpack(Handle<Value> v8obj, msgpack_object *mo, msgpack_zone *mz, size_t depth) {
                                                                     ^
../src/msgpack.cc:102:74: error: unexpected type name 'size_t': expected expression
v8_to_msgpack(Handle<Value> v8obj, msgpack_object *mo, msgpack_zone *mz, size_t depth) {
                                                                         ^
../src/msgpack.cc:102:87: error: expected ';' after top level declarator
v8_to_msgpack(Handle<Value> v8obj, msgpack_object *mo, msgpack_zone *mz, size_t depth) {
                                                                                      ^
                                                                                      ;
10 errors generated.
make: *** [Release/obj.target/msgpackBinding/src/msgpack.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/heathcliff/.nvm/versions/node/v12.4.0/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 "/Users/heathcliff/.nvm/versions/node/v12.4.0/bin/node" "/Users/heathcliff/.nvm/versions/node/v12.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/heathcliff/.nvm/versions/node/v12.4.0/lib/node_modules/msgpack
gyp ERR! node -v v12.4.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
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!     /Users/heathcliff/.npm/_logs/2019-06-27T03_21_30_816Z-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.