ForNeVeR / Kaiwa

A modern XMPP Web client
MIT License
74 stars 13 forks source link

gyp ERR! build error #204

Closed lordfiSh closed 7 years ago

lordfiSh commented 7 years ago

Can you help? I have trouble testing kaiwa. Server is Ubuntu 16 LTS. npm: 3.5.2-0ubuntu4 nodejs: 4.2.6~dfsg-1ubuntu4.1

root@testvm:/home/jabber/kaiwa# npm install
npm WARN deprecated node-uuid@1.4.7: use uuid module instead
loadDep:wildemitter → aft ▐ ╢███████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDep:traceablepeerconn ▀ ╢██████████████████████████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDep:node-stringprep → ▐ ╢██████████████████████████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDevDep:webpack-fail-p ▄ ╢██████████████████████████████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm WARN prefer global npm@3.10.10 should be installed with -g

                                                                                                                                                               [1127/1996]

> node-stringprep@0.7.3 install /home/jabber/kaiwa/node_modules/node-stringprep
> node-gyp rebuild

make: Entering directory '/home/jabber/kaiwa/node_modules/node-stringprep/build'
  CXX(target) Release/obj.target/node_stringprep/node-stringprep.o
In file included from ../node-stringprep.cc:1:0:
../../nan/nan.h:261:25: error: redefinition of ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)’
 NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
                         ^
../../nan/nan.h:256:25: note: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here
 NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
                         ^
../../nan/nan.h:661:13: error: ‘node::smalloc’ has not been declared
     , node::smalloc::FreeCallback callback
             ^
../../nan/nan.h:661:35: error: expected ‘,’ or ‘...’ before ‘callback’
     , node::smalloc::FreeCallback callback
                                   ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
../../nan/nan.h:665:50: error: ‘callback’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                  ^
../../nan/nan.h:665:60: error: ‘hint’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                            ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../../nan/nan.h:672:67: error: no matching function for call to ‘New(v8::Isolate*, const char*&, uint32_t&)’
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
In file included from ../../nan/nan.h:25:0,
                 from ../node-stringprep.cc:1:
/usr/include/nodejs/src/node_buffer.h:31:40: note: candidate: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match>
 NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                        ^
/usr/include/nodejs/src/node_buffer.h:31:40: note:   conversion of argument 3 would be ill-formed:
In file included from ../node-stringprep.cc:1:0:
../../nan/nan.h:672:67: error: invalid conversion from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’ [-fpermissive]
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
In file included from ../../nan/nan.h:25:0,
                 from ../node-stringprep.cc:1:
/usr/include/nodejs/src/node_buffer.h:43:40: note: candidate: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match>
 NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                        ^
/usr/include/nodejs/src/node_buffer.h:43:40: note:   conversion of argument 2 would be ill-formed:
In file included from ../node-stringprep.cc:1:0:
../../nan/nan.h:672:67: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../../nan/nan.h:676:29: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’
     return node::Buffer::New(v8::Isolate::GetCurrent(), size);
                             ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
../../nan/nan.h:683:12: error: ‘Use’ is not a member of ‘node::Buffer’
     return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
            ^
../node-stringprep.cc: In function ‘void ToUnicode(const v8::FunctionCallbackInfo<v8::Value>&)’:
../node-stringprep.cc:212:48: warning: ‘int32_t uidna_toUnicode_55(const UChar*, int32_t, UChar*, int32_t, int32_t, UParseError*, UErrorCode*)’ is deprecated [-Wdeprecated-declarations]
                                    NULL, &error);
                                                ^

In file included from /usr/include/x86_64-linux-gnu/unicode/platform.h:23:0,
                 from /usr/include/x86_64-linux-gnu/unicode/ptypes.h:50,
                 from /usr/include/x86_64-linux-gnu/unicode/umachine.h:44,
                 from /usr/include/x86_64-linux-gnu/unicode/utypes.h:36,
                 from /usr/include/x86_64-linux-gnu/unicode/unistr.h:29,
                 from ../node-stringprep.cc:2:
/usr/include/x86_64-linux-gnu/unicode/uidna.h:574:1: note: declared here
 uidna_toASCII(const UChar* src, int32_t srcLength,
 ^
../node-stringprep.cc:267:35: warning: ‘int32_t uidna_toASCII_55(const UChar*, int32_t, UChar*, int32_t, int32_t, UParseError*, UErrorCode*)’ is deprecated [-Wdeprecated-declarations]
                       NULL, &error);
                                   ^
In file included from /usr/include/x86_64-linux-gnu/unicode/platform.h:23:0,
                 from /usr/include/x86_64-linux-gnu/unicode/ptypes.h:50,
                 from /usr/include/x86_64-linux-gnu/unicode/umachine.h:44,
                 from /usr/include/x86_64-linux-gnu/unicode/utypes.h:36,
                 from /usr/include/x86_64-linux-gnu/unicode/unistr.h:29,
                 from ../node-stringprep.cc:2:
/usr/include/x86_64-linux-gnu/unicode/uidna.h:574:1: note: declared here
 uidna_toASCII(const UChar* src, int32_t srcLength,
 ^
node_stringprep.target.mk:88: recipe for target 'Release/obj.target/node_stringprep/node-stringprep.o' failed
make: *** [Release/obj.target/node_stringprep/node-stringprep.o] Error 1
make: Leaving directory '/home/jabber/kaiwa/node_modules/node-stringprep/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:269: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.10.23-xxxx-std-ipv6-64
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/jabber/kaiwa/node_modules/node-stringprep
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:node-stringprep@0.7.3 node-stringprep@0.7.3 install: `node-gyp rebuild`
npm WARN install:node-stringprep@0.7.3 Exit status 1
kaiwa.im@1.1.0 /home/jabber/kaiwa
├── @types/async@2.0.38
├── @types/classnames@0.0.31
├── @types/history@2.0.45
├── @types/jquery@2.0.39
├── @types/lodash@4.14.50
├─┬ @types/node-uuid@0.0.28
│ └── @types/node@7.0.2
.......
npm WARN In npm@3.10.10 replacing bundled version of har-validator with har-validator@2.0.6
npm WARN In npm@3.10.10 replacing bundled version of npmlog with npmlog@3.1.2
npm WARN In npm@3.10.10 replacing bundled version of npmlog with npmlog@4.0.0
npm WARN In npm@3.10.10 replacing bundled version of npmlog with npmlog@3.1.2
npm WARN In npm@3.10.10 replacing bundled version of es6-symbol with es6-symbol@3.1.0
npm WARN In npm@3.10.10 replacing bundled version of fstream-npm with fstream-npm@1.2.0
npm WARN In npm@3.10.10 replacing bundled version of init-package-json with init-package-json@1.9.4
npm WARN In npm@3.10.10 replacing bundled version of read-package-json with read-package-json@2.0.4
npm WARN In npm@3.10.10 replacing bundled version of npm-registry-client with npm-registry-client@7.2.1
npm WARN In npm@3.10.10 replacing bundled version of array-index with array-index@1.0.0
npm WARN In npm@3.10.10 replacing bundled version of request with request@2.75.0
npm WARN In npm@3.10.10 replacing bundled version of path-array with path-array@1.0.1
npm WARN In npm@3.10.10 replacing bundled version of node-gyp with node-gyp@3.4.0
root@testvm:/home/jabber/kaiwa#
vitalyster commented 7 years ago

which branch you are trying to build?

vitalyster commented 7 years ago

Anyway, node-stringprep is an optional dependency and kaiwa should work without it

ForNeVeR commented 7 years ago

Hello! node-stringprep is not just an "optional" dependency; Kaiwa doesn't use it at all (because it runs in browser and not on Node.js). Errors when building it should be safely ignored; actually, we have the same issue both on Travis and Appveyor CI servers, and we don't care (because optional dependency build failures don't affect npm return code).

Please ignore this "error", the dependency is marked as optional and isn't necessary for Kaiwa at all.