contextify icon indicating copy to clipboard operation
contextify copied to clipboard

Failed Installation on Linux Mint (Linux-3.16.0.38 Generic)

Open alayek opened this issue 11 years ago • 10 comments

Hi, I am trying to install it with npm on a Linux Mint system, but it's failing the build. Here's the install log FYI.

\
> [email protected] install /home/alayek/.npm-global/lib/node_modules/contextify
> node-gyp rebuild

make: Entering directory `/home/alayek/.npm-global/lib/node_modules/contextify/build'
  CXX(target) Release/obj.target/contextify/src/contextify.o
In file included from ../src/contextify.cc:3:0:
../node_modules/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) {
                         ^
../node_modules/nan/nan.h:256:25: error: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here
 NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
                         ^
../node_modules/nan/nan.h:661:13: error: ‘node::smalloc’ has not been declared
     , node::smalloc::FreeCallback callback
             ^
../node_modules/nan/nan.h:661:35: error: expected ‘,’ or ‘...’ before ‘callback’
     , node::smalloc::FreeCallback callback
                                   ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
../node_modules/nan/nan.h:665:50: error: ‘callback’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                  ^
../node_modules/nan/nan.h:665:60: error: ‘hint’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                            ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../node_modules/nan/nan.h:672:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
../node_modules/nan/nan.h:672:67: note: candidates are:
In file included from ../node_modules/nan/nan.h:25:0,
                 from ../src/contextify.cc:3:
/home/alayek/.node-gyp/4.1.0/include/node/node_buffer.h:31:40: note: 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,
                                        ^
/home/alayek/.node-gyp/4.1.0/include/node/node_buffer.h:31:40: note:   no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’
/home/alayek/.node-gyp/4.1.0/include/node/node_buffer.h:43:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match>
 NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                        ^
/home/alayek/.node-gyp/4.1.0/include/node/node_buffer.h:43:40: note:   no known conversion for argument 2 from ‘const char*’ to ‘char*’
In file included from ../src/contextify.cc:3:0:
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../node_modules/nan/nan.h:676:61: 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);
                                                             ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
../node_modules/nan/nan.h:683:12: error: ‘Use’ is not a member of ‘node::Buffer’
     return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
            ^
make: *** [Release/obj.target/contextify/src/contextify.o] Error 1
make: Leaving directory `/home/alayek/.npm-global/lib/node_modules/contextify/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.16.0-38-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/alayek/.npm-global/lib/node_modules/contextify
gyp ERR! node -v v4.1.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm ERR! Linux 3.16.0-38-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "-g" "contextify"
npm ERR! node v4.1.0
npm ERR! npm  v2.14.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 contextify 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 contextify
npm ERR! There is likely additional logging output above.

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

alayek avatar Oct 11 '15 15:10 alayek

I get the same thing: node v4.1.2 npm v2.14.4

tkane2000 avatar Oct 13 '15 13:10 tkane2000

    "dependencies": {
        "bindings" : "*",
        "nan" : "~1.8.4"
    },

for node v4+ nan2 needed

ghost avatar Oct 14 '15 20:10 ghost

Can confirm the same error on Debian Jessie.

ekovac avatar Oct 18 '15 16:10 ekovac

Confirming same error. Windows 7 Enterprise 64x node 4.1.2 npm 3.3.4

gravidThoughts avatar Oct 20 '15 15:10 gravidThoughts

As @sleewoo alluded to above, this is because node 4.x requires NAN 2.x. See #180. Their is a pull request #181 which addresses this issue. Unfortunately it looks dead in the water at this point.

gravidThoughts avatar Oct 20 '15 15:10 gravidThoughts

In linuxMint 17.2, i fix this with: npm install -g node-gyp before npm install

edgrcas avatar Oct 23 '15 22:10 edgrcas

Is there any change to make a new release of contextify now that nan2 is used ? Not being able to use this package on current node versions is annoying

stof avatar Nov 12 '15 10:11 stof

Fixed in 0.1.15

brianmcd avatar Nov 12 '15 16:11 brianmcd

16799 error Linux 3.16.0-38-generic 16800 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "yo" "bower" "grunt-cli" "gulp" 16801 error node v5.0.0 16802 error npm v3.3.6 16803 error path /usr/local/lib/node_modules/grunt-cli/node_modules/nopt 16804 error code EACCES 16805 error errno -13 16806 error syscall access 16807 error Error: EACCES: permission denied, access '/usr/local/lib/node_modules/grunt-cli/node_modules/nopt' 16807 error at Error (native) 16807 error { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules/grunt-cli/node_modules/nopt'] 16807 error errno: -13, 16807 error code: 'EACCES', 16807 error syscall: 'access', 16807 error path: '/usr/local/lib/node_modules/grunt-cli/node_modules/nopt' } 16808 error Please try running this command again as root/Administrator. 16809 verbose exit [ -13, true ] i got this problem in mint os have you any solution for this please write about it

anoopgecbh avatar Nov 19 '15 10:11 anoopgecbh

This seems like a permissions problem on your machine and doesn't appear to have anything to do with Contextify...

idoby avatar Nov 19 '15 19:11 idoby