http-sync
http-sync copied to clipboard
Installation fails on Ubuntu 16.04 with Node 6.3.1
I tried installing from npm and got the following error:
$ npm i http-sync
> [email protected] install /home/ola/workspace/js/new-import-script/node_modules/http-sync
> node-gyp rebuild
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
make: Entering directory '/home/ola/workspace/js/new-import-script/node_modules/http-sync/build'
CXX(target) Release/obj.target/curllib/curllib.o
In file included from ../curllib.cc:8: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:473:20: error: variable or field ‘NanAddGCEpilogueCallback’ declared void
v8::Isolate::GCEpilogueCallback callback
^
../../nan/nan.h:473:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCEpilogueCallback callback
^
../../nan/nan.h:474:18: error: expected primary-expression before ‘gc_type_filter’
, v8::GCType gc_type_filter = v8::kGCTypeAll) {
^
../../nan/nan.h:479:20: error: variable or field ‘NanRemoveGCEpilogueCallback’ declared void
v8::Isolate::GCEpilogueCallback callback) {
^
../../nan/nan.h:479:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCEpilogueCallback callback) {
^
../../nan/nan.h:484:20: error: variable or field ‘NanAddGCPrologueCallback’ declared void
v8::Isolate::GCPrologueCallback callback
^
../../nan/nan.h:484:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCPrologueCallback callback
^
../../nan/nan.h:485:18: error: expected primary-expression before ‘gc_type_filter’
, v8::GCType gc_type_filter = v8::kGCTypeAll) {
^
../../nan/nan.h:490:20: error: variable or field ‘NanRemoveGCPrologueCallback’ declared void
v8::Isolate::GCPrologueCallback callback) {
^
../../nan/nan.h:490:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCPrologueCallback callback) {
^
../../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: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
In file included from ../../nan/nan.h:25:0,
from ../curllib.cc:8:
/home/ola/.node-gyp/6.3.1/include/node/node_buffer.h:46:40: note: initializing argument 2 of ‘v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t)’
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
In file included from ../curllib.cc:8:0:
../../nan/nan.h:672:29: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((char*)data), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’
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);
^
curllib.target.mk:88: recipe for target 'Release/obj.target/curllib/curllib.o' failed
make: *** [Release/obj.target/curllib/curllib.o] Error 1
make: Leaving directory '/home/ola/workspace/js/new-import-script/node_modules/http-sync/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/ola/.nvm/versions/node/v6.3.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 4.4.0-47-generic
gyp ERR! command "/home/ola/.nvm/versions/node/v6.3.1/bin/node" "/home/ola/.nvm/versions/node/v6.3.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ola/workspace/js/new-import-script/node_modules/http-sync
gyp ERR! node -v v6.3.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm ERR! Linux 4.4.0-47-generic
npm ERR! argv "/home/ola/.nvm/versions/node/v6.3.1/bin/node" "/home/ola/.nvm/versions/node/v6.3.1/bin/npm" "i" "http-sync"
npm ERR! node v6.3.1
npm ERR! npm v3.10.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! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the http-sync package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs http-sync
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls http-sync
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/ola/workspace/js/new-import-script/npm-debug.log
Running on Ubuntu 16.04, with libcurl4-openssl-dev installed.
i also have this issue with a higher version of node
This is still an issue. package not installable
Has there been any movement on this?
Hi any updates on this?