由于北美节点不支持thumbnail,所以添加了两个nodejs modules用于在server上创建thumbnails, 在本地环境modules安装成功,代码都可以跑了,但是deploy到服务器上就一直出问题,测试了把其他代码全部删除了,只要有添加以下dependency到package.json, 都会报错。

"image-type": "~2.1.0",
"lwip": "~0.0.8",

错误如下:(由于字数超过,截掉了中间的错误信息)

部署应用失败: Error: Command failed: npm WARN package.json mandrill-api@1.0.45 No README data In file included from /home/ubuntu/.node-gyp/0.11.5/src/node_object_wrap.h:26:0, from /home/ubuntu/.node-gyp/0.11.5/src/node.h:62, from ../src/decoder/decoder.h:11, from ../src/decoder/init.cpp:1: /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h: In member function ‘void v8::ReturnValue::Set(uint32_t)’: /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:5846:31: warning: typedef ‘I’ locally defined but not used [-Wunused-local-typedefs] typedef internal::Internals I; ^ In file included from ../src/decoder/decoder.h:13:0, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan.h: At global scope: ../node_modules/nan/nan.h:161:43: error: expected template-name before ‘<’ token public v8::NonCopyablePersistentTraits {}; ^ ../node_modules/nan/nan.h:161:43: error: expected ‘{’ before ‘<’ token ../node_modules/nan/nan.h:161:43: error: expected unqualified-id before ‘<’ token ../node_modules/nan/nan.h:164:40: error: expected template-name before ‘<’ token public v8::CopyablePersistentTraits {}; ^ ../node_modules/nan/nan.h:164:40: error: expected ‘{’ before ‘<’ token ../node_modules/nan/nan.h:164:40: error: expected unqualified-id before ‘<’ token ../node_modules/nan/nan.h:168:30: error: expected template-name before ‘<’ token public v8::PersistentBase {}; ^ ../node_modules/nan/nan.h:168:30: error: expected ‘{’ before ‘<’ token ../node_modules/nan/nan.h:168:30: error: expected unqualified-id before ‘<’ token ../node_modules/nan/nan.h:170:35: error: expected type-specifier template > ^ ../node_modules/nan/nan.h:170:35: error: expected ‘>’ In file included from ../node_modules/nan/nan.h:188:0, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_new.h:181:16: error: ‘UnboundScript’ is not a member of ‘v8’ struct Factory : MaybeFactoryBase { ^ ../node_modules/nan/nan_new.h:181:16: note: suggested alternative: In file included from ../src/decoder/decoder.h:13:0, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan.h:143:32: note: ‘Nan::UnboundScript’ typedef v8::Script UnboundScript; ^ In file included from ../node_modules/nan/nan.h:188:0, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_new.h:181:16: error: ‘UnboundScript’ is not a member of ‘v8’ struct Factory : MaybeFactoryBase { ^ ../node_modules/nan/nan_new.h:181:16: note: suggested alternative: In file included from ../src/decoder/decoder.h:13:0, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan.h:143:32: note: ‘Nan::UnboundScript’ typedef v8::Script UnboundScript; ^ In file included from ../node_modules/nan/nan.h:188:0, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_new.h:181:33: error: template argument 1 is invalid struct Factory : MaybeFactoryBase { ^ ../node_modules/nan/nan_new.h:181:54: error: ‘UnboundScript’ is not a member of ‘v8’ struct Factory : MaybeFactoryBase { ^ ../node_modules/nan/nan_new.h:181:54: note: suggested alternative: In file included from ../src/decoder/decoder.h:13:0, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan.h:143:32: note: ‘Nan::UnboundScript’ typedef v8::Script UnboundScript; ^ In file included from ../node_modules/nan/nan.h:188:0, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_new.h:181:54: error: ‘UnboundScript’ is not a member of ‘v8’ struct Factory : MaybeFactoryBase { ^ ../node_modules/nan/nan_new.h:181:54: note: suggested alternative: In file included from ../src/decoder/decoder.h:13:0, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan.h:143:32: note: ‘Nan::UnboundScript’ typedef v8::Script UnboundScript; ^ In file included from ../node_modules/nan/nan.h:188:0, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_new.h:181:71: error: template argument 1 is invalid struct Factory : MaybeFactoryBase { ^ In file included from ../node_modules/nan/nan_new.h:189:0, from ../node_modules/nan/nan.h:188, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase::return_t Nan::imp::Factory::New()’: ../node_modules/nan/nan_implementation_12_inl.h:21:49: error: invalid conversion from ‘v8::Isolate*’ to ‘int’ [-fpermissive] return v8::Array::New(v8::Isolate::GetCurrent()); ^ In file included from /home/ubuntu/.node-gyp/0.11.5/src/node_object_wrap.h:26:0, from /home/ubuntu/.node-gyp/0.11.5/src/node.h:62, from ../src/decoder/decoder.h:11, from ../src/decoder/init.cpp:1: /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:2320:23: error: initializing argument 1 of ‘static v8::Local v8::Array::New(int)’ [-fpermissive] static Local New(int length = 0); ^ In file included from ../node_modules/nan/nan_new.h:189:0, from ../node_modules/nan/nan.h:188, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase::return_t Nan::imp::Factory::New(int)’: ../node_modules/nan/nan_implementation_12_inl.h:26:58: error: no matching function for call to ‘v8::Array::New(v8::Isolate*, int&)’ return v8::Array::New(v8::Isolate::GetCurrent(), length); ^ ../node_modules/nan/nan_implementation_12_inl.h:26:58: note: candidate is: In file included from /home/ubuntu/.node-gyp/0.11.5/src/node_object_wrap.h:26:0, from /home/ubuntu/.node-gyp/0.11.5/src/node.h:62, from ../src/decoder/decoder.h:11, from ../src/decoder/init.cpp:1: /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:2320:23: note: static v8::Local v8::Array::New(int) static Local New(int length = 0); ^ /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:2320:23: note: candidate expects 1 argument, 2 provided In file included from ../node_modules/nan/nan_new.h:189:0, from ../node_modules/nan/nan.h:188, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase::return_t Nan::imp::Factory::New(bool)’: ../node_modules/nan/nan_implementation_12_inl.h:33:59: error: no matching function for call to ‘v8::Boolean::New(v8::Isolate*, bool&)’ return v8::Boolean::New(v8::Isolate::GetCurrent(), value); ^ ../node_modules/nan/nan_implementation_12_inl.h:33:59: note: candidate is: In file included from /home/ubuntu/.node-gyp/0.11.5/src/node_object_wrap.h:26:0, from /home/ubuntu/.node-gyp/0.11.5/src/node.h:62, from ../src/decoder/decoder.h:11, from ../src/decoder/init.cpp:1: /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:6000:17: note: static v8::Handle v8::Boolean::New(bool) Handle Boolean::New(bool value) { ^ /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:6000:17: note: candidate expects 1 argument, 2 provided In file included from ../node_modules/nan/nan_new.h:189:0, from ../node_modules/nan/nan.h:188, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::MaybeFactoryBase::return_t Nan::imp::Factory::New(double)’: ../node_modules/nan/nan_implementation_12_inl.h:70:53: error: no matching function for call to ‘v8::Date::New(v8::Isolate*, double&)’ v8::Date::New(v8::Isolate::GetCurrent(), value).As()); ^ ../node_modules/nan/nan_implementation_12_inl.h:70:53: note: candidate is: In file included from /home/ubuntu/.node-gyp/0.11.5/src/node_object_wrap.h:26:0, from /home/ubuntu/.node-gyp/0.11.5/src/node.h:62, from ../src/decoder/decoder.h:11, from ../src/decoder/init.cpp:1: /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:2720:23: note: static v8::Local v8::Date::New(double) static Local New(double time); ^ /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:2720:23: note: candidate expects 1 argument, 2 provided In file included from ../node_modules/nan/nan_new.h:189:0, from ../node_modules/nan/nan.h:188, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_implementation_12_inl.h:69:37: error: expected primary-expression before ‘(’ token return Factory::return_t( ^ ../node_modules/nan/nan_implementation_12_inl.h:70:53: error: no matching function for call to ‘v8::Date::New(v8::Isolate*, double&)’ v8::Date::New(v8::Isolate::GetCurrent(), value).As()); ^ ../node_modules/nan/nan_implementation_12_inl.h:70:53: note: candidate is: In file included from /home/ubuntu/.node-gyp/0.11.5/src/node_object_wrap.h:26:0, from /home/ubuntu/.node-gyp/0.11.5/src/node.h:62, from ../src/decoder/decoder.h:11, from ../src/decoder/init.cpp:1: /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:2720:23: note: static v8::Localv8::Date::New(double) static Local New(double time); ^ /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:2720:23: note: candidate expects 1 argument, 2 provided In file included from ../node_modules/nan/nan_new.h:189:0, from ../node_modules/nan/nan.h:188, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_implementation_12_inl.h:70:66: error: expected primary-expression before ‘>’ token v8::Date::New(v8::Isolate::GetCurrent(), value).As()); ^ ../node_modules/nan/nan_implementation_12_inl.h:70:68: error: expected primary-expression before ‘)’ token v8::Date::New(v8::Isolate::GetCurrent(), value).As()); ^ ../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase::return_t Nan::imp::Factory::New(void*)’: ../node_modules/nan/nan_implementation_12_inl.h:78:60: error: no matching function for call to ‘v8::External::New(v8::Isolate*, void*&)’ return v8::External::New(v8::Isolate::GetCurrent(), value); ^ ../node_modules/nan/nan_implementation_12_inl.h:78:60: note: candidate is: In file included from /home/ubuntu/.node-gyp/0.11.5/src/node_object_wrap.h:26:0, from /home/ubuntu/.node-gyp/0.11.5/src/node.h:62, from ../src/decoder/decoder.h:11, from ../src/decoder/init.cpp:1: /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:2899:26: note: static v8::Localv8::External::New(void*) static Local New(void* value); ^ /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:2899:26: note: candidate expects 1 argument, 2 provided In file included from ../node_modules/nan/nan_new.h:189:0, from ../node_modules/nan/nan.h:188, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase::return_t Nan::imp::Factory::New(Nan::FunctionCallback, v8::Local)’: ../node_modules/nan/nan_implementation_12_inl.h:88:70: error: no matching function for call to ‘v8::ObjectTemplate::New(v8::Isolate*&)’ v8::Local tpl = v8::ObjectTemplate::New(isolate); ^ ../node_modules/nan/nan_implementation_12_inl.h:88:70: note: candidates are: In file included from /home/ubuntu/.node-gyp/0.11.5/src/node_object_wrap.h:26:0, from /home/ubuntu/.node-gyp/0.11.5/src/node.h:62, from ../src/decoder/decoder.h:11, from ../src/decoder/init.cpp:1: /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:3384:32: note: static v8::Local v8::ObjectTemplate::New() static Local New(); ^ /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:3384:32: note: candidate expects 0 arguments, 1 provided /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:3558:32: note: static v8::Local v8::ObjectTemplate::New(v8::Handle) static Local New(Handle constructor); ^ /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:3558:32: note: no known conversion for argument 1 from ‘v8::Isolate*’ to ‘v8::Handle’ In file included from ../node_modules/nan/nan_new.h:189:0, from ../node_modules/nan/nan.h:188, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_implementation_12_inl.h:94:68: error: no matching function for call to ‘v8::External::New(v8::Isolate*&, void*)’ , v8::External::New(isolate, reinterpret_cast(callback))); ^ ../node_modules/nan/nan_implementation_12_inl.h:94:68: note: candidate is: In file included from /home/ubuntu/.node-gyp/0.11.5/src/node_object_wrap.h:26:0, from /home/ubuntu/.node-gyp/0.11.5/src/node.h:62, from ../src/decoder/decoder.h:11, from ../src/decoder/init.cpp:1: /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:2899:26: note: static v8::Localv8::External::New(void*) static Local New(void* value); ^ /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:2899:26: note: candidate expects 1 argument, 2 provided In file included from ../node_modules/nan/nan_new.h:189:0, from ../node_modules/nan/nan.h:188, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_implementation_12_inl.h:102:10: error: ‘scope’ was not declared in this scope return scope.Escape(v8::Function::New( isolate ^ ../node_modules/nan/nan_implementation_12_inl.h:104:32: error: no matching function for call to ‘v8::Function::New(v8::Isolate*&, void (&)(const v8::FunctionCallbackInfo&), v8::Local&)’ , obj)); ^ ../node_modules/nan/nan_implementation_12_inl.h:104:32: note: candidate is: In file included from /home/ubuntu/.node-gyp/0.11.5/src/node_object_wrap.h:26:0, from /home/ubuntu/.node-gyp/0.11.5/src/node.h:62, from ../src/decoder/decoder.h:11, from ../src/decoder/init.cpp:1: /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:2292:24: note: static v8::Local v8::Object::New() static Local New(); ^ /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:2292:24: note: candidate expects 0 arguments, 3 provided In file included from ../node_modules/nan/nan_new.h:189:0, from ../node_modules/nan/nan.h:188, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase::return_t Nan::imp::Factory::New(Nan::FunctionCallback, v8::Local, v8::Local)’: ../node_modules/nan/nan_implementation_12_inl.h:115:5: error: ‘EscapableHandleScope’ is not a member of ‘v8’ v8::EscapableHandleScope scope(isolate); ^ ../node_modules/nan/nan_implementation_12_inl.h:115:30: error: expected ‘;’ before ‘scope’ v8::EscapableHandleScope scope(isolate); ^ ../node_modules/nan/nan_implementation_12_inl.h:116:72: error: no matching function for call to ‘v8::ObjectTemplate::New(v8::Isolate*&)’ v8::Local tpl = v8::ObjectTemplate::New(isolate); ^ ../node_modules/nan/nan_implementation_12_inl.h:116:72: note: candidates are: In file included from /home/ubuntu/.node-gyp/0.11.5/src/node_object_wrap.h:26:0, from /home/ubuntu/.node-gyp/0.11.5/src/node.h:62, from ../src/decoder/decoder.h:11, from ../src/decoder/init.cpp:1: /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:3384:32: note: static v8::Local v8::ObjectTemplate::New() static Local New(); ^ /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:3384:32: note: candidate expects 0 arguments, 1 provided /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:3558:32: note: static v8::Local v8::ObjectTemplate::New(v8::Handle) static Local New(Handle constructor); ^ /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:3558:32: note: no known conversion for argument 1 from ‘v8::Isolate*’ to ‘v8::Handle’ In file included from ../node_modules/nan/nan_new.h:189:0, from ../node_modules/nan/nan.h:188, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_implementation_12_inl.h:122:70: error: no matching function for call to ‘v8::External::New(v8::Isolate*&, void*)’ , v8::External::New(isolate, reinterpret_cast(callback))); ^ ../node_modules/nan/nan_implementation_12_inl.h:122:70: note: candidate is: In file included from /home/ubuntu/.node-gyp/0.11.5/src/node_object_wrap.h:26:0, from /home/ubuntu/.node-gyp/0.11.5/src/node.h:62, from ../src/decoder/decoder.h:11, from ../src/decoder/init.cpp:1: /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:2899:26: note: static v8::Localv8::External::New(void*) static Local New(void* value); ^ /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:2899:26: note: candidate expects 1 argument, 2 provided In file included from ../node_modules/nan/nan_new.h:189:0, from ../node_modules/nan/nan.h:188, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_implementation_12_inl.h:129:12: error: ‘scope’ was not declared in this scope return scope.Escape(v8::FunctionTemplate::New( isolate ^ ../node_modules/nan/nan_implementation_12_inl.h:132:48: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Isolate*&, void (&)(const v8::FunctionCallbackInfo&), v8::Local&, v8::Local&)’ , signature)); ^ ../node_modules/nan/nan_implementation_12_inl.h:132:48: note: candidates are: In file included from /home/ubuntu/.node-gyp/0.11.5/src/node_object_wrap.h:26:0, from /home/ubuntu/.node-gyp/0.11.5/src/node.h:62, from ../src/decoder/decoder.h:11, from ../src/decoder/init.cpp:1: /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:3293:48: note: static v8::Local v8::FunctionTemplate::New(v8::InvocationCallback, v8::Handle, v8::Handle, int) V8_DEPRECATED(static Local New( ^ /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:88:35: note: in definition of macro ‘V8_DEPRECATED’ #define V8_DEPRECATED(declarator) declarator attribute ((deprecated)) ^ /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:3293:48: note: no known conversion for argument 1 from ‘v8::Isolate*’ to ‘v8::InvocationCallback {aka v8::Handle ()(const v8::Arguments&)}’ V8_DEPRECATED(static Local New( ^ /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:88:35: note: in definition of macro ‘V8_DEPRECATED’ #define V8_DEPRECATED(declarator) declarator attribute ((deprecated)) ^ /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:3298:34: note: static v8::Local v8::FunctionTemplate::New(v8::FunctionCallback, v8::Handle, v8::Handle, int) static Local New( ^ /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:3298:34: note: no known conversion for argument 1 from ‘v8::Isolate’ to ‘v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo&)}’ In file included from ../node_modules/nan/nan_new.h:189:0, from ../node_modules/nan/nan.h:188, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_implementation_12_inl.h:176:67: error: invalid conversion from ‘uint32_t
::invoke); ^ ../node_modules/nan/nan_weak.h:381:46: error: template argument 2 is invalid reinterpret_cast*>(this) ^ ../node_modules/nan/nan_weak.h:381:47: error: expected ‘>’ before ‘’ token reinterpret_cast>(this) ^ ../node_modules/nan/nan_weak.h:381:47: error: expected ‘(’ before ‘’ token ../node_modules/nan/nan_weak.h:381:48: error: expected primary-expression before ‘>’ token reinterpret_cast>(this) ^ ../node_modules/nan/nan_weak.h:386:5: error: ‘PersistentBase’ is not a member of ‘v8’ v8::PersistentBase::SetWeak(wcbd, WeakCallbackInfo
::invoke); ^ ../node_modules/nan/nan_weak.h:386:5: note: suggested alternative: In file included from ../src/decoder/decoder.h:13:0, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan.h:167:7: note: ‘Nan::PersistentBase’ class PersistentBase : ^ In file included from ../node_modules/nan/nan.h:2078:0, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_weak.h:386:25: error: expected primary-expression before ‘>’ token v8::PersistentBase::SetWeak(wcbd, WeakCallbackInfo
::invoke); ^ ../node_modules/nan/nan_weak.h:386:26: error: ‘::SetWeak’ has not been declared v8::PersistentBase::SetWeak(wcbd, WeakCallbackInfo
::invoke); ^ In file included from ../node_modules/nan/nan.h:2082:0, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_object_wrap.h: At global scope: ../node_modules/nan/nan_object_wrap.h:47:31: error: template argument 2 is invalid inline Persistent& persistent() { ^ ../node_modules/nan/nan_object_wrap.h:132:20: error: ‘v8::WeakCallbackData’ has not been declared WeakCallback(v8::WeakCallbackData const& data) { ^ ../node_modules/nan/nan_object_wrap.h:132:36: error: expected ‘,’ or ‘...’ before ‘<’ token WeakCallback(v8::WeakCallbackData const& data) { ^ ../node_modules/nan/nan_object_wrap.h:151:24: error: template argument 2 is invalid Persistent handle_; ^ ../node_modules/nan/nan_object_wrap.h: In destructor ‘virtual Nan::ObjectWrap::~ObjectWrap()’: ../node_modules/nan/nan_object_wrap.h:20:22: error: request for member ‘IsEmpty’ in ‘Nan::ObjectWrap::persistent()’, which is of non-class type ‘int’ if (persistent().IsEmpty()) { ^ In file included from /home/ubuntu/.node-gyp/0.11.5/src/node.h:101:0, from ../src/decoder/decoder.h:11, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_object_wrap.h:24:25: error: request for member ‘IsNearDeath’ in ‘Nan::ObjectWrap::persistent()’, which is of non-class type ‘int’ assert(persistent().IsNearDeath()); ^ In file included from ../node_modules/nan/nan.h:2082:0, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_object_wrap.h:25:18: error: request for member ‘ClearWeak’ in ‘Nan::ObjectWrap::persistent()’, which is of non-class type ‘int’ persistent().ClearWeak(); ^ ../node_modules/nan/nan_object_wrap.h:26:18: error: request for member ‘Reset’ in ‘Nan::ObjectWrap::persistent()’, which is of non-class type ‘int’ persistent().Reset(); ^ In file included from /home/ubuntu/.node-gyp/0.11.5/src/node.h:101:0, from ../src/decoder/decoder.h:11, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_object_wrap.h: In member function ‘void Nan::ObjectWrap::Wrap(v8::Local)’: ../node_modules/nan/nan_object_wrap.h:54:25: error: request for member ‘IsEmpty’ in ‘Nan::ObjectWrap::persistent()’, which is of non-class type ‘int’ assert(persistent().IsEmpty()); ^ In file included from ../node_modules/nan/nan.h:2082:0, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_object_wrap.h:57:18: error: request for member ‘Reset’ in ‘Nan::ObjectWrap::persistent()’, which is of non-class type ‘int’ persistent().Reset(object); ^ ../node_modules/nan/nan_object_wrap.h: In member function ‘void Nan::ObjectWrap::MakeWeak()’: ../node_modules/nan/nan_object_wrap.h:73:18: error: ‘v8::PersistentBase’ is not a class member persistent().v8::PersistentBase::SetWeak(this, WeakCallback); ^ ../node_modules/nan/nan_object_wrap.h:73:47: error: expected primary-expression before ‘>’ token persistent().v8::PersistentBase::SetWeak(this, WeakCallback); ^ ../node_modules/nan/nan_object_wrap.h:73:48: error: ‘::SetWeak’ has not been declared persistent().v8::PersistentBase::SetWeak(this, WeakCallback); ^ ../node_modules/nan/nan_object_wrap.h:74:18: error: request for member ‘MarkIndependent’ in ‘Nan::ObjectWrap::persistent()’, which is of non-class type ‘int’ persistent().MarkIndependent(); ^ In file included from /home/ubuntu/.node-gyp/0.11.5/src/node.h:101:0, from ../src/decoder/decoder.h:11, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_object_wrap.h: In member function ‘virtual void Nan::ObjectWrap::Ref()’: ../node_modules/nan/nan_object_wrap.h:91:26: error: request for member ‘IsEmpty’ in ‘Nan::ObjectWrap::persistent()’, which is of non-class type ‘int’ assert(!persistent().IsEmpty()); ^ In file included from ../node_modules/nan/nan.h:2082:0, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_object_wrap.h:92:18: error: request for member ‘ClearWeak’ in ‘Nan::ObjectWrap::persistent()’, which is of non-class type ‘int’ persistent().ClearWeak(); ^ In file included from /home/ubuntu/.node-gyp/0.11.5/src/node.h:101:0, from ../src/decoder/decoder.h:11, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_object_wrap.h: In member function ‘virtual void Nan::ObjectWrap::Unref()’: ../node_modules/nan/nan_object_wrap.h:106:26: error: request for member ‘IsEmpty’ in ‘Nan::ObjectWrap::persistent()’, which is of non-class type ‘int’ assert(!persistent().IsEmpty()); ^ ../node_modules/nan/nan_object_wrap.h:107:26: error: request for member ‘IsWeak’ in ‘Nan::ObjectWrap::persistent()’, which is of non-class type ‘int’ assert(!persistent().IsWeak()); ^ In file included from ../node_modules/nan/nan.h:2082:0, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_object_wrap.h: In static member function ‘static void Nan::ObjectWrap::WeakCallback(int)’: ../node_modules/nan/nan_object_wrap.h:133:24: error: ‘data’ was not declared in this scope ObjectWrap* wrap = data.GetParameter(); ^ In file included from /home/ubuntu/.node-gyp/0.11.5/src/node.h:101:0, from ../src/decoder/decoder.h:11, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_object_wrap.h:135:26: error: request for member ‘IsNearDeath’ in ‘wrap->Nan::ObjectWrap::handle_’, which is of non-class type ‘int’ assert(wrap->handle_.IsNearDeath()); ^ In file included from ../node_modules/nan/nan.h:2082:0, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_object_wrap.h:136:19: error: request for member ‘Reset’ in ‘wrap->Nan::ObjectWrap::handle_’, which is of non-class type ‘int’ wrap->handle_.Reset(); ^ In file included from ../src/decoder/decoder.h:13:0, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan.h: At global scope: ../node_modules/nan/nan.h:2122:24: error: template argument 2 is invalid Persistent t_; ^ ../node_modules/nan/nan.h: In constructor ‘Nan::Tap::Tap(v8::Local)’: ../node_modules/nan/nan.h:2098:8: error: request for member ‘Reset’ in ‘((Nan::Tap*)this)->Nan::Tap::t_’, which is of non-class type ‘int’ t_.Reset(To(t).ToLocalChecked()); ^ ../node_modules/nan/nan.h: In destructor ‘Nan::Tap::~Tap()’: ../node_modules/nan/nan.h:2101:15: error: request for member ‘Reset’ in ‘((Nan::Tap*)this)->Nan::Tap::t_’, which is of non-class type ‘int’ ~Tap() { t_.Reset(); } // not sure if neccessary ^ In file included from /home/ubuntu/.node-gyp/0.11.5/src/node_object_wrap.h:26:0, from /home/ubuntu/.node-gyp/0.11.5/src/node.h:62, from ../src/decoder/decoder.h:11, from ../src/decoder/init.cpp:1: /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h: In instantiation of ‘v8::Handle::Handle(v8::Handle) [with S = v8::Int32; T = v8::Object]’: ../node_modules/nan/nan.h:1366:40: required from here /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:220:37: error: cannot convert ‘v8::Int32*’ to ‘v8::Object* volatile’ in assignment (static_cast(0)) = static_cast(0); \ ^ /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:280:5: note: in expansion of macro ‘TYPE_CHECK’ TYPE_CHECK(T, S); ^ /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h: In instantiation of ‘v8::Local::Local(v8::Local) [with S = v8::Int32; T = v8::Object]’: ../node_modules/nan/nan_object_wrap.h:43:28: required from here /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:220:37: error: cannot convert ‘v8::Int32’ to ‘v8::Object* volatile’ in assignment (static_cast(0)) = static_cast(0); \ ^ /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:406:5: note: in expansion of macro ‘TYPE_CHECK’ TYPE_CHECK(T, S); ^ In file included from ../node_modules/nan/nan_new.h:189:0, from ../node_modules/nan/nan.h:188, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_implementation_12_inl.h: In instantiation of ‘static Nan::imp::IntegerFactory::return_t Nan::imp::IntegerFactory::New(int32_t) [with T = v8::Int32; Nan::imp::IntegerFactory::return_t = v8::Local; int32_t = int]’: ../node_modules/nan/nan_new.h:208:35: required from ‘typename Nan::imp::Factory::return_t Nan::New(A0) [with T = v8::Int32; A0 = int; typename Nan::imp::Factory::return_t = v8::Local]’ ../node_modules/nan/nan_new.h:275:30: required from here ../node_modules/nan/nan_implementation_12_inl.h:158:47: error: invalid conversion from ‘v8::Isolate’ to ‘int32_t {aka int}’ [-fpermissive] return To(T::New(v8::Isolate::GetCurrent(), value)); ^ In file included from /home/ubuntu/.node-gyp/0.11.5/src/node_object_wrap.h:26:0, from /home/ubuntu/.node-gyp/0.11.5/src/node.h:62, from ../src/decoder/decoder.h:11, from ../src/decoder/init.cpp:1: /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:1938:25: error: initializing argument 1 of ‘static v8::Local v8::Integer::New(int32_t, v8::Isolate*)’ [-fpermissive] static Local New(int32_t value, Isolate*); ^ In file included from ../node_modules/nan/nan_new.h:189:0, from ../node_modules/nan/nan.h:188, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_implementation_12_inl.h:158:55: error: invalid conversion from ‘int32_t {aka int}’ to ‘v8::Isolate*’ [-fpermissive] return To(T::New(v8::Isolate::GetCurrent(), value)); ^ In file included from /home/ubuntu/.node-gyp/0.11.5/src/node_object_wrap.h:26:0, from /home/ubuntu/.node-gyp/0.11.5/src/node.h:62, from ../src/decoder/decoder.h:11, from ../src/decoder/init.cpp:1: /home/ubuntu/.node-gyp/0.11.5/deps/v8/include/v8.h:1938:25: error: initializing argument 2 of ‘static v8::Local v8::Integer::New(int32_t, v8::Isolate*)’ [-fpermissive] static Local New(int32_t value, Isolate*); ^ In file included from ../src/decoder/decoder.h:13:0, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan.h: In member function ‘v8::LocalNan::Callback::Call_(v8::Isolate*, v8::Local, int, v8::Local*) const’: ../node_modules/nan/nan.h:1433:3: warning: control reaches end of non-void function [-Wreturn-type] } ^ In file included from ../node_modules/nan/nan_new.h:189:0, from ../node_modules/nan/nan.h:188, from ../src/decoder/decoder.h:13, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase::return_t Nan::imp::Factory::New()’: ../node_modules/nan/nan_implementation_12_inl.h:184:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ ../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase::return_t Nan::imp::Factory::New(Nan::FunctionCallback, v8::Local, v8::Local)’: ../node_modules/nan/nan_implementation_12_inl.h:136:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ make: *** [Release/obj.target/lwip_decoder/src/decoder/init.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:267:23) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:103:17) gyp ERR! stack at Process.ChildProcess.handle.onexit (childprocess.js:794:12) gyp ERR! System Linux 3.13.0-34-generic gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /mnt/avos/data/uluru-cloud-code/repos/W9BCIPx2biwKiKfUvVJtc8kF/repos/20151111-074557/node_modules/lwip gyp ERR! node -v v0.11.5 gyp ERR! node-gyp -v v1.0.1 gyp ERR! not ok npm ERR! lwip@0.0.8 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the lwip@0.0.8 install script. npm ERR! This is most likely a problem with the lwip 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 lwip npm ERR! There is likely additional logging output above. npm ERR! System Linux 3.13.0-34-generic npm ERR! command "node" "/usr/local/bin/npm" "install" "-q" "--production" npm ERR! cwd /mnt/avos/data/uluru-cloud-code/repos/W9BCIPx2biwKiKfUvVJtc8kF/repos/20151111-074557 npm ERR! node -v v0.11.5 npm ERR! npm -v 1.4.24 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /mnt/avos/data/uluru-cloud-code/repos/W9BCIPx2biwKiKfUvVJtc8kF/repos/20151111-074557/npm-debug.log npm ERR! not ok code 0

是 us 节点的 Node.js 版本不合适,现在已经更新为 0.12 的版本。