stf icon indicating copy to clipboard operation
stf copied to clipboard

nodejs 10.+ version cannot npm install stf successfull

Open Sunraych opened this issue 7 years ago • 4 comments

What is the issue or idea you have? nodejs 10.+ version cannot npm install stf successfull. But nodejs 8.+ is ok Does it only happen on a specific device? Please run adb devices -l and paste the corresponding row.

Please provide the steps to reproduce the issue.

What is the expected behavior? stf can support nodejs 10.+ Do you see errors or warnings in the stf local output? If so, please paste them or the full log here.

Please run stf doctor and paste the output here.

Sunraych avatar Feb 15 '19 10:02 Sunraych

I have spent the last few days trying to get STF to work with node 10+ with no luck. Fails with bufferutil `Failed at the [email protected] install script 'node-gyp rebuid' several permission issues too.

tried forcing to use the latest bufferutil (4.0.1) but unsuccessfully.

eventually uninstalled node 10 and tried with 8, works fine.

alandriver avatar Feb 28 '19 11:02 alandriver

same problem [email protected] with node.js 10 my two days time

tsiwt avatar Apr 02 '19 13:04 tsiwt

Same error on Mac OS with node v10.16.0 and node v12.4.0. Don't know how to solve this. And no, deleting the node_modules didn't solve the problem... I'll try with node 8.

ArthurMaroulier avatar Jun 26 '19 08:06 ArthurMaroulier

I have trouble with when running 'npm install -g stf' node v13.11.0 and npm v6.13.7, here my error log `npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated @slack/[email protected]: v3.x and lower are no longer supported. see migration guide: https://github.com/slackapi/node-slack-sdk/wiki/Migration-Guide-for-v4 npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated [email protected]: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues. npm WARN deprecated [email protected]: Use uuid module instead npm WARN deprecated [email protected]: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues. npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated [email protected]: Critical security bugs fixed in 2.5.5 npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3. /usr/local/bin/stf -> /usr/local/lib/node_modules/stf/bin/stf

[email protected] install /usr/local/lib/node_modules/stf/node_modules/dtrace-provider node-gyp rebuild || node suppress-error.js

ACTION binding_gyp_ndtp_target_build_ndtp .

Building dtrace-provider failed with exit code 1, falling back on stub implementation.

Re-run install with V set in your environment to see the build output, or NODE_DTRACE_PROVIDER_REQUIRE=hard to force an installation failure.

TOUCH Release/obj.target/ndtp.stamp

[email protected] install /usr/local/lib/node_modules/stf/node_modules/bufferutil node-gyp rebuild

CXX(target) Release/obj.target/bufferutil/src/bufferutil.o In file included from ../src/bufferutil.cc:16: In file included from ../../nan/nan.h:190: ../../nan/nan_maybe_43_inl.h:88:15: error: no member named 'ForceSet' in 'v8::Object' return obj->ForceSet(GetCurrentContext(), key, value, attribs); ~~~ ^ In file included from ../src/bufferutil.cc:16: In file included from ../../nan/nan.h:195: In file included from ../../nan/nan_converters.h:59: ../../nan/nan_converters_43_inl.h:18:1: error: no viable conversion from 'v8::Localv8::Context' to 'v8::Isolate ' X(Boolean) ^~~~~~~~~~ ../../nan/nan_converters_43_inl.h:15:26: note: expanded from macro 'X' return val->To ## TYPE(GetCurrentContext());
^~~~~~~~~~~~~~~~~~~ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:2762:37: note: passing argument to parameter 'isolate' here Local ToBoolean(Isolate
isolate) const; ^ In file included from ../src/bufferutil.cc:16: In file included from ../../nan/nan.h:195: In file included from ../../nan/nan_converters.h:59: ../../nan/nan_converters_43_inl.h:34:1: error: no viable conversion from 'v8::Localv8::Context' to 'v8::Isolate ' X(bool, Boolean) ^~~~~~~~~~~~~~~~ ../../nan/nan_converters_43_inl.h:31:29: note: expanded from macro 'X' return val->NAME ## Value(GetCurrentContext());
^~~~~~~~~~~~~~~~~~~ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:2771:30: note: passing argument to parameter 'isolate' here bool BooleanValue(Isolate
isolate) const; ^ In file included from ../src/bufferutil.cc:16: In file included from ../../nan/nan.h:196: In file included from ../../nan/nan_new.h:189: ../../nan/nan_implementation_12_inl.h:107:42: error: no viable conversion from 'v8::Isolate *' to 'Localv8::Context' return scope.Escape(v8::Function::New( isolate ^~~~~~~ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:189:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Isolate *' to 'const v8::Localv8::Context &' for 1st argument class Local { ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:189:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Isolate *' to 'v8::Localv8::Context &&' for 1st argument /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:193:13: note: candidate template ignored: could not match 'Local' against 'v8::Isolate ' V8_INLINE Local(Local that) ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:4313:22: note: passing argument to parameter 'context' here Local context, FunctionCallback callback, ^ In file included from ../src/bufferutil.cc:16: In file included from ../../nan/nan.h:196: In file included from ../../nan/nan_new.h:189: ../../nan/nan_implementation_12_inl.h:345:37: error: too few arguments to function call, expected 2, have 1 return v8::StringObject::New(value).Asv8::StringObject(); ~~~~~~~~~~~~~~~~~~~~~ ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:5688:3: note: 'New' declared here static Local New(Isolate isolate, Local value); ^ In file included from ../src/bufferutil.cc:16: ../../nan/nan.h:816:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations] return node::MakeCallback( ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/node.h:187:1: note: 'MakeCallback' has been explicitly marked deprecated here NODE_DEPRECATED("Use MakeCallback(..., async_context)", ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/node.h:107:20: note: expanded from macro 'NODE_DEPRECATED' attribute((deprecated(message))) declarator ^ In file included from ../src/bufferutil.cc:16: ../../nan/nan.h:830:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations] return node::MakeCallback( ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/node.h:180:1: note: 'MakeCallback' has been explicitly marked deprecated here NODE_DEPRECATED("Use MakeCallback(..., async_context)", ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/node.h:107:20: note: expanded from macro 'NODE_DEPRECATED' attribute((deprecated(message))) declarator ^ In file included from ../src/bufferutil.cc:16: ../../nan/nan.h:844:18: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations] return node::MakeCallback( ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/node.h:173:1: note: 'MakeCallback' has been explicitly marked deprecated here NODE_DEPRECATED("Use MakeCallback(..., async_context)", ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/node.h:107:20: note: expanded from macro 'NODE_DEPRECATED' attribute((deprecated(message))) declarator ^ In file included from ../src/bufferutil.cc:16: ../../nan/nan.h:890:53: error: too few arguments to function call, single argument 'context' was not specified v8::Localv8::String string = from->ToString(); ~~~~~~~~~~~~~~ ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:2750:3: note: 'ToString' declared here V8_WARN_UNUSED_RESULT MaybeLocal ToString( ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8config.h:419:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT' #define V8_WARN_UNUSED_RESULT attribute((warn_unused_result)) ^ In file included from ../src/bufferutil.cc:16: ../../nan/nan.h:900:37: error: cannot initialize a parameter of type 'v8::Isolate ' with an lvalue of type 'char ' length_ = string->WriteUtf8(str_, static_cast(len), 0, flags); ^~~~ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:2947:26: note: passing argument to parameter 'isolate' here int WriteUtf8(Isolate isolate, char buffer, int length = -1, ^ In file included from ../src/bufferutil.cc:16: ../../nan/nan.h:1447:31: warning: 'MakeCallback' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations] return scope.Escape(node::MakeCallback( ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/node.h:187:1: note: 'MakeCallback' has been explicitly marked deprecated here NODE_DEPRECATED("Use MakeCallback(..., async_context)", ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/node.h:107:20: note: expanded from macro 'NODE_DEPRECATED' attribute((deprecated(message))) declarator ^ In file included from ../src/bufferutil.cc:16: ../../nan/nan.h:1507:28: error: no matching member function for call to 'Set' New(persistentHandle)->Set(New(key).ToLocalChecked(), value); ~~~~~~~~~~~~~~~~~~~~~~~^~~ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided V8_WARN_UNUSED_RESULT Maybe Set(Local context, ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index, ^ In file included from ../src/bufferutil.cc:16: ../../nan/nan.h:1513:28: error: no matching member function for call to 'Set' New(persistentHandle)->Set(key, value); ~~~~~~~~~~~~~~~~~~~~~~~^~~ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided V8_WARN_UNUSED_RESULT Maybe Set(Local context, ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index, ^ In file included from ../src/bufferutil.cc:16: ../../nan/nan.h:1519:28: error: no matching member function for call to 'Set' New(persistentHandle)->Set(index, value); ~~~~~~~~~~~~~~~~~~~~~~~^~~ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided V8_WARN_UNUSED_RESULT Maybe Set(Local context, ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index, ^ In file included from ../src/bufferutil.cc:16: ../../nan/nan.h:1525:32: error: no matching member function for call to 'Get' New(persistentHandle)->Get(New(key).ToLocalChecked())); ~~~~~~~~~~~~~~~~~~~~~~~^~~ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:3594:43: note: candidate function not viable: requires 2 arguments, but 1 was provided V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context, ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:3597:43: note: candidate function not viable: requires 2 arguments, but 1 was provided V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context, ^ In file included from ../src/bufferutil.cc:16: ../../nan/nan.h:1531:48: error: no matching member function for call to 'Get' return scope.Escape(New(persistentHandle)->Get(key)); ~~~~~~~~~~~~~~~~~~~~~~~^~~ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:3594:43: note: candidate function not viable: requires 2 arguments, but 1 was provided V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context, ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:3597:43: note: candidate function not viable: requires 2 arguments, but 1 was provided V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context, ^ In file included from ../src/bufferutil.cc:16: ../../nan/nan.h:1536:48: error: no matching member function for call to 'Get' return scope.Escape(New(persistentHandle)->Get(index)); ~~~~~~~~~~~~~~~~~~~~~~~^~~ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:3594:43: note: candidate function not viable: requires 2 arguments, but 1 was provided V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context, ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:3597:43: note: candidate function not viable: requires 2 arguments, but 1 was provided V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context, ^ In file included from ../src/bufferutil.cc:16: In file included from ../../nan/nan.h:2190: ../../nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraitsv8::Object >' assert(persistent().IsNearDeath()); ~~~~~~~~~~~~ ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert' (__builtin_expect(!(e), 0) ? _assert_rtn(func, FILE, LINE, #e) : (void)0) ^ In file included from ../src/bufferutil.cc:16: In file included from ../../nan/nan.h:2190: ../../nan/nan_object_wrap.h:67:18: error: no member named 'MarkIndependent' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraitsv8::Object >' persistent().MarkIndependent(); ~~~~~~~~~~~~ ^ ../../nan/nan_object_wrap.h:124:26: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraitsv8::Object >' assert(wrap->handle.IsNearDeath()); ~~~~~~~~~~~~~ ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert' (__builtin_expect(!(e), 0) ? __assert_rtn(func, FILE, LINE, #e) : (void)0) ^ ../src/bufferutil.cc:25:30: error: no template named 'Handle' in namespace 'v8' static void Initialize(v8::Handlev8::Object target) ~~~~^ ../src/bufferutil.cc:33:86: error: too few arguments to function call, single argument 'context' was not specified Nan::Set(target, Nan::New("BufferUtil").ToLocalChecked(), t->GetFunction()); ~~~~~~~~~~~~~~ ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:6283:3: note: 'GetFunction' declared here V8_WARN_UNUSED_RESULT MaybeLocal GetFunction( ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8config.h:419:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT' #define V8_WARN_UNUSED_RESULT attribute((warn_unused_result)) ^ ../src/bufferutil.cc:49:49: error: too few arguments to function call, single argument 'context' was not specified Local bufferObj = info[0]->ToObject(); ~~~~~~~~~~~~~~~~~ ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8.h:2754:3: note: 'ToObject' declared here V8_WARN_UNUSED_RESULT MaybeLocal ToObject( ^ /Users/huyhuynh/Library/Caches/node-gyp/13.11.0/include/node/v8config.h:419:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT' #define V8_WARN_UNUSED_RESULT attribute((warn_unused_result)) ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 4 warnings and 20 errors generated. make: *** [Release/obj.target/bufferutil/src/bufferutil.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:194:23) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! System Darwin 19.4.0 gyp ERR! command "/usr/local/Cellar/node/13.11.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/stf/node_modules/bufferutil gyp ERR! node -v v13.11.0 gyp ERR! node-gyp -v v5.0.7 gyp ERR! not ok 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! /Users/huyhuynh/.npm/_logs/2020-06-03T08_21_29_597Z-debug.log` Please help!

hnkhuy avatar Jun 03 '20 08:06 hnkhuy