{"action":"created","issue":{"url":"https://api.github.com/repos/brianmcd/contextify/issues/188","repository_url":"https://api.github.com/repos/brianmcd/contextify","labels_url":"https://api.github.com/repos/brianmcd/contextify/issues/188/labels{/name}","comments_url":"https://api.github.com/repos/brianmcd/contextify/issues/188/comments","events_url":"https://api.github.com/repos/brianmcd/contextify/issues/188/events","html_url":"https://github.com/brianmcd/contextify/issues/188","id":111853095,"number":188,"title":"Contextify fails to install in Node 4.2.1 on OSX 10.11 (El Capitan).","user":{"login":"chevex","id":874394,"avatar_url":"https://avatars.githubusercontent.com/u/874394?v=3","gravatar_id":"","url":"https://api.github.com/users/chevex","html_url":"https://github.com/chevex","followers_url":"https://api.github.com/users/chevex/followers","following_url":"https://api.github.com/users/chevex/following{/other_user}","gists_url":"https://api.github.com/users/chevex/gists{/gist_id}","starred_url":"https://api.github.com/users/chevex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chevex/subscriptions","organizations_url":"https://api.github.com/users/chevex/orgs","repos_url":"https://api.github.com/users/chevex/repos","events_url":"https://api.github.com/users/chevex/events{/privacy}","received_events_url":"https://api.github.com/users/chevex/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":40,"created_at":"2015-10-16T15:20:04Z","updated_at":"2016-03-06T18:44:00Z","closed_at":"2015-11-12T16:02:03Z","body":"Reproduction steps:\r\n\r\n1. Ensure you have node 4.x installed.\r\n\r\n2. Create an empty directory so you know for sure there are no other conflicts occurring.\r\n\r\n3. Run `npm install contextify`.\r\n\r\n4. Note the following build error:\r\n\r\n```\r\n> contextify@0.1.14 install /Users/chev/code/sandbox/node_modules/contextify\r\n> node-gyp rebuild\r\n\r\n  CXX(target) Release/obj.target/contextify/src/contextify.o\r\nIn file included from ../src/contextify.cc:3:\r\n../node_modules/nan/nan.h:261:25: error: redefinition of '_NanEnsureLocal'\r\nNAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {\r\n                        ^\r\n../node_modules/nan/nan.h:256:25: note: previous definition is here\r\nNAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {\r\n                        ^\r\n../node_modules/nan/nan.h:661:13: error: no member named 'smalloc' in namespace 'node'\r\n    , node::smalloc::FreeCallback callback\r\n      ~~~~~~^\r\n../node_modules/nan/nan.h:672:12: error: no matching function for call to 'New'\r\n    return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);\r\n           ^~~~~~~~~~~~~~~~~\r\n/Users/chev/.node-gyp/4.2.1/include/node/node_buffer.h:31:40: note: candidate function not viable: no known conversion from 'uint32_t' (aka 'unsigned int') to 'enum encoding' for 3rd argument\r\nNODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,\r\n                                       ^\r\n/Users/chev/.node-gyp/4.2.1/include/node/node_buffer.h:43:40: note: candidate function not viable: 2nd argument ('const char *') would lose const qualifier\r\nNODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,\r\n                                       ^\r\n/Users/chev/.node-gyp/4.2.1/include/node/node_buffer.h:28:40: note: candidate function not viable: requires 2 arguments, but 3 were provided\r\nNODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);\r\n                                       ^\r\n/Users/chev/.node-gyp/4.2.1/include/node/node_buffer.h:36:40: note: candidate function not viable: requires 5 arguments, but 3 were provided\r\nNODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,\r\n                                       ^\r\nIn file included from ../src/contextify.cc:3:\r\n../node_modules/nan/nan.h:676:12: error: no viable conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object>'\r\n    return node::Buffer::New(v8::Isolate::GetCurrent(), size);\r\n           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n/Users/chev/.node-gyp/4.2.1/include/node/v8.h:210:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object> &' for 1st argument\r\nclass Local {\r\n      ^\r\n/Users/chev/.node-gyp/4.2.1/include/node/v8.h:210:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object> &&' for 1st argument\r\nclass Local {\r\n      ^\r\n/Users/chev/.node-gyp/4.2.1/include/node/v8.h:214:13: note: candidate template ignored: could not match 'Local' against 'MaybeLocal'\r\n  V8_INLINE Local(Local<S> that)\r\n            ^\r\n/Users/chev/.node-gyp/4.2.1/include/node/v8.h:326:13: note: candidate template ignored: could not match 'S *' against 'v8::MaybeLocal<v8::Object>'\r\n  V8_INLINE Local(S* that)\r\n            ^\r\nIn file included from ../src/contextify.cc:3:\r\n../node_modules/nan/nan.h:683:26: error: no member named 'Use' in namespace 'node::Buffer'\r\n    return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);\r\n           ~~~~~~~~~~~~~~^\r\nIn file included from ../src/contextify.cc:1:\r\nIn file included from /Users/chev/.node-gyp/4.2.1/include/node/node.h:42:\r\n/Users/chev/.node-gyp/4.2.1/include/node/v8.h:221:5: error: assigning to 'v8::Primitive *volatile' from incompatible type 'v8::Value *'\r\n    TYPE_CHECK(T, S);\r\n    ^~~~~~~~~~~~~~~~\r\n/Users/chev/.node-gyp/4.2.1/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'\r\n    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \\\r\n                                    ^ ~~~~~~~~~~~~~~~~~~\r\n../node_modules/nan/nan.h:414:12: note: in instantiation of function template specialization 'v8::Local<v8::Primitive>::Local<v8::Value>' requested here\r\n    return NanEscapeScope(NanNew(v8::Undefined(v8::Isolate::GetCurrent())));\r\n           ^\r\n../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'\r\n# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))\r\n                             ^\r\nIn file included from ../src/contextify.cc:1:\r\nIn file included from /Users/chev/.node-gyp/4.2.1/include/node/node.h:42:\r\n/Users/chev/.node-gyp/4.2.1/include/node/v8.h:221:5: error: assigning to 'v8::Boolean *volatile' from incompatible type 'v8::Value *'\r\n    TYPE_CHECK(T, S);\r\n    ^~~~~~~~~~~~~~~~\r\n/Users/chev/.node-gyp/4.2.1/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'\r\n    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \\\r\n                                    ^ ~~~~~~~~~~~~~~~~~~\r\n../node_modules/nan/nan.h:424:12: note: in instantiation of function template specialization 'v8::Local<v8::Boolean>::Local<v8::Value>' requested here\r\n    return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent())));\r\n           ^\r\n../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'\r\n# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))\r\n                             ^\r\nIn file included from ../src/contextify.cc:1:\r\nIn file included from /Users/chev/.node-gyp/4.2.1/include/node/node.h:42:\r\n/Users/chev/.node-gyp/4.2.1/include/node/v8.h:221:5: error: assigning to 'v8::Function *volatile' from incompatible type 'v8::Value *'\r\n    TYPE_CHECK(T, S);\r\n    ^~~~~~~~~~~~~~~~\r\n/Users/chev/.node-gyp/4.2.1/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'\r\n    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \\\r\n                                    ^ ~~~~~~~~~~~~~~~~~~\r\n../node_modules/nan/nan.h:1514:12: note: in instantiation of function template specialization 'v8::Local<v8::Function>::Local<v8::Value>' requested here\r\n    return NanEscapeScope(NanNew(handle)->Get(kCallbackIndex)\r\n           ^\r\n../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'\r\n# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))\r\n                             ^\r\nIn file included from ../src/contextify.cc:1:\r\nIn file included from /Users/chev/.node-gyp/4.2.1/include/node/node.h:42:\r\n/Users/chev/.node-gyp/4.2.1/include/node/v8.h:221:5: error: assigning to 'v8::Object *volatile' from incompatible type 'v8::Value *'\r\n    TYPE_CHECK(T, S);\r\n    ^~~~~~~~~~~~~~~~\r\n/Users/chev/.node-gyp/4.2.1/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'\r\n    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \\\r\n                                    ^ ~~~~~~~~~~~~~~~~~~\r\n../node_modules/nan/nan.h:1632:12: note: in instantiation of function template specialization 'v8::Local<v8::Object>::Local<v8::Value>' requested here\r\n    return NanEscapeScope(handle->Get(NanNew(key)).As<v8::Object>());\r\n           ^\r\n../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'\r\n# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))\r\n                             ^\r\nIn file included from ../src/contextify.cc:1:\r\nIn file included from /Users/chev/.node-gyp/4.2.1/include/node/node.h:42:\r\n/Users/chev/.node-gyp/4.2.1/include/node/v8.h:221:5: error: assigning to 'v8::Value *volatile' from incompatible type 'v8::Context *'\r\n    TYPE_CHECK(T, S);\r\n    ^~~~~~~~~~~~~~~~\r\n/Users/chev/.node-gyp/4.2.1/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'\r\n    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \\\r\n                                    ^ ~~~~~~~~~~~~~~~~~~\r\n../node_modules/nan/nan.h:267:10: note: in instantiation of function template specialization 'v8::Local<v8::Value>::Local<v8::Context>' requested here\r\n  return NanNew(val);\r\n         ^\r\n../src/contextify.cc:159:16: note: in instantiation of function template specialization '_NanEnsureLocal<v8::Local<v8::Context> >' requested here\r\n        return NanEscapeScope(NanNew<Context>(\r\n               ^\r\n../node_modules/nan/nan.h:398:43: note: expanded from macro 'NanEscapeScope'\r\n# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))\r\n                                          ^\r\nIn file included from ../src/contextify.cc:1:\r\nIn file included from /Users/chev/.node-gyp/4.2.1/include/node/node.h:42:\r\n/Users/chev/.node-gyp/4.2.1/include/node/v8.h:221:5: error: assigning to 'v8::Context *volatile' from incompatible type 'v8::Value *'\r\n    TYPE_CHECK(T, S);\r\n    ^~~~~~~~~~~~~~~~\r\n/Users/chev/.node-gyp/4.2.1/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'\r\n    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \\\r\n                                    ^ ~~~~~~~~~~~~~~~~~~\r\n../src/contextify.cc:159:16: note: in instantiation of function template specialization 'v8::Local<v8::Context>::Local<v8::Value>' requested here\r\n        return NanEscapeScope(NanNew<Context>(\r\n               ^\r\n../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'\r\n# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))\r\n                             ^\r\nIn file included from ../src/contextify.cc:1:\r\nIn file included from /Users/chev/.node-gyp/4.2.1/include/node/node.h:42:\r\n/Users/chev/.node-gyp/4.2.1/include/node/v8.h:7380:3: error: assigning to 'v8::Integer *volatile' from incompatible type 'v8::Value *'\r\n  TYPE_CHECK(T, S);\r\n  ^~~~~~~~~~~~~~~~\r\n/Users/chev/.node-gyp/4.2.1/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'\r\n    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \\\r\n                                    ^ ~~~~~~~~~~~~~~~~~~\r\n../src/contextify.cc:211:13: note: in instantiation of function template specialization 'v8::ReturnValue<v8::Integer>::Set<v8::Value>' requested here\r\n            NanReturnValue(NanNew<Integer>(None));\r\n            ^\r\n../node_modules/nan/nan.h:401:61: note: expanded from macro 'NanReturnValue'\r\n# define NanReturnValue(value) return args.GetReturnValue().Set(_NanEnsureLocal(value))\r\n                                                            ^\r\nIn file included from ../src/contextify.cc:1:\r\nIn file included from /Users/chev/.node-gyp/4.2.1/include/node/node.h:42:\r\n/Users/chev/.node-gyp/4.2.1/include/node/v8.h:7380:3: error: assigning to 'v8::Boolean *volatile' from incompatible type 'v8::Value *'\r\n  TYPE_CHECK(T, S);\r\n  ^~~~~~~~~~~~~~~~\r\n/Users/chev/.node-gyp/4.2.1/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'\r\n    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \\\r\n                                    ^ ~~~~~~~~~~~~~~~~~~\r\n../src/contextify.cc:225:13: note: in instantiation of function template specialization 'v8::ReturnValue<v8::Boolean>::Set<v8::Value>' requested here\r\n            NanReturnValue(NanNew<Boolean>(false));\r\n            ^\r\n../node_modules/nan/nan.h:401:61: note: expanded from macro 'NanReturnValue'\r\n# define NanReturnValue(value) return args.GetReturnValue().Set(_NanEnsureLocal(value))\r\n                                                            ^\r\nIn file included from ../src/contextify.cc:1:\r\nIn file included from /Users/chev/.node-gyp/4.2.1/include/node/node.h:42:\r\n/Users/chev/.node-gyp/4.2.1/include/node/v8.h:7380:3: error: assigning to 'v8::Array *volatile' from incompatible type 'v8::Value *'\r\n  TYPE_CHECK(T, S);\r\n  ^~~~~~~~~~~~~~~~\r\n/Users/chev/.node-gyp/4.2.1/include/node/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'\r\n    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \\\r\n                                    ^ ~~~~~~~~~~~~~~~~~~\r\n../src/contextify.cc:236:13: note: in instantiation of function template specialization 'v8::ReturnValue<v8::Array>::Set<v8::Value>' requested here\r\n            NanReturnValue(blank);\r\n            ^\r\n../node_modules/nan/nan.h:401:61: note: expanded from macro 'NanReturnValue'\r\n# define NanReturnValue(value) return args.GetReturnValue().Set(_NanEnsureLocal(value))\r\n                                                            ^\r\n14 errors generated.\r\nmake: *** [Release/obj.target/contextify/src/contextify.o] Error 1\r\ngyp ERR! build error\r\ngyp ERR! stack Error: `make` failed with exit code: 2\r\ngyp ERR! stack     at ChildProcess.onExit (/Users/chev/.nvm/versions/node/v4.2.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)\r\ngyp ERR! stack     at emitTwo (events.js:87:13)\r\ngyp ERR! stack     at ChildProcess.emit (events.js:172:7)\r\ngyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)\r\ngyp ERR! System Darwin 15.0.0\r\ngyp ERR! command \"/Users/chev/.nvm/versions/node/v4.2.1/bin/node\" \"/Users/chev/.nvm/versions/node/v4.2.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"\r\ngyp ERR! cwd /Users/chev/code/sandbox/node_modules/contextify\r\ngyp ERR! node -v v4.2.1\r\ngyp ERR! node-gyp -v v3.0.3\r\ngyp ERR! not ok\r\nnpm ERR! Darwin 15.0.0\r\nnpm ERR! argv \"/Users/chev/.nvm/versions/node/v4.2.1/bin/node\" \"/Users/chev/.nvm/versions/node/v4.2.1/bin/npm\" \"install\" \"contextify\"\r\nnpm ERR! node v4.2.1\r\nnpm ERR! npm  v2.14.7\r\nnpm ERR! code ELIFECYCLE\r\n\r\nnpm ERR! contextify@0.1.14 install: `node-gyp rebuild`\r\nnpm ERR! Exit status 1\r\nnpm ERR!\r\nnpm ERR! Failed at the contextify@0.1.14 install script 'node-gyp rebuild'.\r\nnpm ERR! This is most likely a problem with the contextify package,\r\nnpm ERR! not with npm itself.\r\nnpm ERR! Tell the author that this fails on your system:\r\nnpm ERR!     node-gyp rebuild\r\nnpm ERR! You can get their info via:\r\nnpm ERR!     npm owner ls contextify\r\nnpm ERR! There is likely additional logging output above.\r\n\r\nnpm ERR! Please include the following file with any support request:\r\nnpm ERR!     /Users/chev/code/sandbox/npm-debug.log\r\n```\r\n\r\nI've tried everything I could think of to get this working but nothing seems to help. I tried updating Xcode, re-installing node, re-installing NVM, re-installing homebrew, installing node manually, etc. Nothing seems to get this installing in Node 4.x. It does work if I downgrade to node 0.12.x, but our project is already taking advantage of some things in Node 4.x. This is the only module in our dependency tree that is failing in Node 4.\r\n\r\nI've also opened an issue in the node-gyp tracker as well: https://github.com/nodejs/node-gyp/issues/774"},"comment":{"url":"https://api.github.com/repos/brianmcd/contextify/issues/comments/192959890","html_url":"https://github.com/brianmcd/contextify/issues/188#issuecomment-192959890","issue_url":"https://api.github.com/repos/brianmcd/contextify/issues/188","id":192959890,"user":{"login":"brianmcd","id":691451,"avatar_url":"https://avatars.githubusercontent.com/u/691451?v=3","gravatar_id":"","url":"https://api.github.com/users/brianmcd","html_url":"https://github.com/brianmcd","followers_url":"https://api.github.com/users/brianmcd/followers","following_url":"https://api.github.com/users/brianmcd/following{/other_user}","gists_url":"https://api.github.com/users/brianmcd/gists{/gist_id}","starred_url":"https://api.github.com/users/brianmcd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianmcd/subscriptions","organizations_url":"https://api.github.com/users/brianmcd/orgs","repos_url":"https://api.github.com/users/brianmcd/repos","events_url":"https://api.github.com/users/brianmcd/events{/privacy}","received_events_url":"https://api.github.com/users/brianmcd/received_events","type":"User","site_admin":false},"created_at":"2016-03-06T18:44:00Z","updated_at":"2016-03-06T18:44:00Z","body":"Great, glad it's working for you."}}