aliyun-ons icon indicating copy to clipboard operation
aliyun-ons copied to clipboard

安装失败

Open Messilimeng opened this issue 7 years ago • 1 comments

[email protected] install /home/alpha_times/node_modules/ons 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/alpha_times/node_modules/ons/build' CXX(target) Release/obj.target/ons/src/entry.o CXX(target) Release/obj.target/ons/src/log_util.o ../src/log_util.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE AliyunONS::SetLogPath(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/log_util.cpp:35:51: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated (declared at /root/.node-gyp/10.0.0/include/node/v8.h:2821): Use Isolate version [-Wdeprecated-declarations] v8::String::Utf8Value path(info[0]->ToString()); ^ CXX(target) Release/obj.target/ons/src/ons_options.o ../src/ons_options.cpp: In constructor ‘ONSOptions::ONSOptions(v8::Local<v8::Value>)’: ../src/ons_options.cpp:54:49: error: no matching function for call to ‘v8::Value::ToInt32()’ thread_num = v8_thread_num->ToInt32()->Value(); ^ ../src/ons_options.cpp:54:49: note: candidates are: In file included from ../src/ons_options.h:25:0, from ../src/ons_options.cpp:21: /root/.node-gyp/10.0.0/include/node/v8.h:2378:43: note: v8::MaybeLocal<v8::Int32> v8::Value::ToInt32(v8::Local<v8::Context>) const V8_WARN_UNUSED_RESULT MaybeLocal<Int32> ToInt32(Local<Context> context) const; ^ /root/.node-gyp/10.0.0/include/node/v8.h:2378:43: note: candidate expects 1 argument, 0 provided In file included from /root/.node-gyp/10.0.0/include/node/v8.h:26:0, from ../src/ons_options.h:25, from ../src/ons_options.cpp:21: /root/.node-gyp/10.0.0/include/node/v8.h:2391:34: note: v8::Local<v8::Int32> v8::Value::ToInt32(v8::Isolate*) const Local<Int32> ToInt32(Isolate* isolate) const); ^ /root/.node-gyp/10.0.0/include/node/v8config.h:340:48: note: in definition of macro ‘V8_DEPRECATE_SOON’ #define V8_DEPRECATE_SOON(message, declarator) declarator ^ /root/.node-gyp/10.0.0/include/node/v8.h:2391:34: note: candidate expects 1 argument, 0 provided Local<Int32> ToInt32(Isolate* isolate) const); ^ /root/.node-gyp/10.0.0/include/node/v8config.h:340:48: note: in definition of macro ‘V8_DEPRECATE_SOON’ #define V8_DEPRECATE_SOON(message, declarator) declarator ^ ../src/ons_options.cpp:59:75: error: no matching function for call to ‘v8::Value::ToInt32()’ send_msg_timeout_millis = v8_send_msg_timeout_millis->ToInt32()->Value(); ^ ../src/ons_options.cpp:59:75: note: candidates are: In file included from ../src/ons_options.h:25:0, from ../src/ons_options.cpp:21: /root/.node-gyp/10.0.0/include/node/v8.h:2378:43: note: v8::MaybeLocal<v8::Int32> v8::Value::ToInt32(v8::Local<v8::Context>) const V8_WARN_UNUSED_RESULT MaybeLocal<Int32> ToInt32(Local<Context> context) const; ^ /root/.node-gyp/10.0.0/include/node/v8.h:2378:43: note: candidate expects 1 argument, 0 provided In file included from /root/.node-gyp/10.0.0/include/node/v8.h:26:0, from ../src/ons_options.h:25, from ../src/ons_options.cpp:21: /root/.node-gyp/10.0.0/include/node/v8.h:2391:34: note: v8::Local<v8::Int32> v8::Value::ToInt32(v8::Isolate*) const Local<Int32> ToInt32(Isolate* isolate) const); ^ /root/.node-gyp/10.0.0/include/node/v8config.h:340:48: note: in definition of macro ‘V8_DEPRECATE_SOON’ #define V8_DEPRECATE_SOON(message, declarator) declarator ^ /root/.node-gyp/10.0.0/include/node/v8.h:2391:34: note: candidate expects 1 argument, 0 provided Local<Int32> ToInt32(Isolate* isolate) const); ^ /root/.node-gyp/10.0.0/include/node/v8config.h:340:48: note: in definition of macro ‘V8_DEPRECATE_SOON’ #define V8_DEPRECATE_SOON(message, declarator) declarator ^ ../src/ons_options.cpp:64:59: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated (declared at /root/.node-gyp/10.0.0/include/node/v8.h:2821): Use Isolate version [-Wdeprecated-declarations] ons_addr = *(v8::String::Utf8Value(v8_ons_addr)); ^ ../src/ons_options.cpp:69:67: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated (declared at /root/.node-gyp/10.0.0/include/node/v8.h:2821): Use Isolate version [-Wdeprecated-declarations] namesrv_addr = *(v8::String::Utf8Value(v8_namesrv_addr)); ^ make: *** [Release/obj.target/ons/src/ons_options.o] Error 1 make: Leaving directory /home/alpha_times/node_modules/ons/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/root/.nvm/versions/node/v10.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:225:12) gyp ERR! System Linux 3.10.0-327.22.2.el7.x86_64 gyp ERR! command "/root/.nvm/versions/node/v10.0.0/bin/node" "/root/.nvm/versions/node/v10.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/alpha_times/node_modules/ons gyp ERR! node -v v10.0.0 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok npm WARN [email protected] No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2018-10-13T03_32_10_476Z-debug.log [root@izwz94xswj2tx87sh1v2lyz alpha_times]#

Messilimeng avatar Oct 13 '18 03:10 Messilimeng

nodejs 版本是 v10.x 的 会报错 当我切换到 v8.x 的好像就能安装成功

Messilimeng avatar Oct 13 '18 03:10 Messilimeng