RuntimeTools / appmetrics

Node Application Metrics provides a foundational infrastructure for collecting resource and performance monitoring data for Node.js-based applications.
https://developer.ibm.com/open/node-application-metrics/
Apache License 2.0
970 stars 125 forks source link

Not able to install on node v12.13(LTS) #627

Closed nithil closed 4 years ago

nithil commented 4 years ago

Screen Shot 2019-11-04 at 12 45 56

mattcolegate commented 4 years ago

@n1th1l Our Travis test for Appmetrics 5.1.1 on Node 12.13 on MacOS passed cleanly: https://travis-ci.org/RuntimeTools/appmetrics/jobs/606748803?utm_medium=notification&utm_source=github_status Can you provide the entire console output from when you typed npm i appmetrics please?

nithil commented 4 years ago
npm i appmetrics

> appmetrics@5.1.1 install /Users/syookdeveloper/syook/insite/syook-tnt-server/node_modules/appmetrics
> node showBuildInfo.js && node-gyp rebuild

Mon, 04 Nov 2019 10:58:30 GMT
********************************************************************************
You are installing the Node Application Metrics monitoring and profiling module.
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
********************************************************************************

********************************************************************************
Appmetrics uses node-gyp to compile and build local binary libraries to enhance execution performance. If the following compilation and build logs contain errors, make sure you have the node-gyp pre-requisites installed (https://github.com/nodejs/node-gyp#installation). If you have them and the build still had errors, see if there are any related issues at https://github.com/RuntimeTools/appmetrics/issues). If there aren't, feel free to open a new issue to report the bug.
********************************************************************************

  ACTION binding_gyp_appmetrics_target_Set_appmetrics_reported_version_build_level Release/obj.target/appmetrics/geni/appmetrics.cpp
infile: ./src/appmetrics.cpp
outfile: /Users/syookdeveloper/syook/insite/syook-tnt-server/node_modules/appmetrics/build/Release/obj.target/appmetrics/geni/appmetrics.cpp
Replacing '"99\.99\.99\.29991231"' with '"5.1.1.201911041628"'
  CXX(target) Release/obj.target/appmetrics/geni/appmetrics.o
In file included from Release/obj.target/appmetrics/geni/appmetrics.cpp:22:
In file included from ../../nan/nan.h:222:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:22:1: warning: 'ToBoolean' is deprecated: ToBoolean can never throw. Use Local version. [-Wdeprecated-declarations]
X(Boolean)
^
../../nan/nan_converters_43_inl.h:18:12: note: expanded from macro 'X'
      val->To ## TYPE(isolate->GetCurrentContext())                            \
           ^
<scratch space>:147:1: note: expanded from here
ToBoolean
^
/Users/syookdeveloper/Library/Caches/node-gyp/12.13.0/include/node/v8.h:2567:3: note: 'ToBoolean' has been explicitly marked deprecated here
  V8_DEPRECATED("ToBoolean can never throw. Use Local version.",
  ^
/Users/syookdeveloper/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from Release/obj.target/appmetrics/geni/appmetrics.cpp:22:
In file included from ../../nan/nan.h:222:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:40:1: warning: 'BooleanValue' is deprecated: BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations]
X(bool, Boolean)
^
../../nan/nan_converters_43_inl.h:37:15: note: expanded from macro 'X'
  return val->NAME ## Value(isolate->GetCurrentContext());                     \
              ^
<scratch space>:154:1: note: expanded from here
BooleanValue
^
/Users/syookdeveloper/Library/Caches/node-gyp/12.13.0/include/node/v8.h:2605:3: note: 'BooleanValue' has been explicitly marked deprecated here
  V8_DEPRECATED("BooleanValue can never throw. Use Isolate version.",
  ^
/Users/syookdeveloper/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from Release/obj.target/appmetrics/geni/appmetrics.cpp:22:
In file included from ../../nan/nan.h:223:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:356:37: error: too few arguments to function call, expected 2, have 1
  return v8::StringObject::New(value).As<v8::StringObject>();
         ~~~~~~~~~~~~~~~~~~~~~      ^
/Users/syookdeveloper/Library/Caches/node-gyp/12.13.0/include/node/v8.h:5426:3: note: 'New' declared here
  static Local<Value> New(Isolate* isolate, Local<String> value);
  ^
In file included from Release/obj.target/appmetrics/geni/appmetrics.cpp:22:
In file included from ../../nan/nan.h:223:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:356:58: error: expected '(' for function-style cast or type construction
  return v8::StringObject::New(value).As<v8::StringObject>();
                                         ~~~~~~~~~~~~~~~~^
../../nan/nan_implementation_12_inl.h:356:60: error: expected expression
  return v8::StringObject::New(value).As<v8::StringObject>();
                                                           ^
In file included from Release/obj.target/appmetrics/geni/appmetrics.cpp:22:
In file included from ../../nan/nan.h:2722:
../../nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
    assert(persistent().IsNearDeath());
           ~~~~~~~~~~~~ ^
/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 Release/obj.target/appmetrics/geni/appmetrics.cpp:22:
In file included from ../../nan/nan.h:2722:
../../nan/nan_object_wrap.h:127:26: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
    assert(wrap->handle_.IsNearDeath());
           ~~~~~~~~~~~~~ ^
/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 Release/obj.target/appmetrics/geni/appmetrics.cpp:25:
In file included from ../src/plugins/node/prof/watchdog.h:21:
../src/plugins/node/prof/compat-inl.h:352:22: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations]
  return v8::String::NewFromUtf8(
                     ^
/Users/syookdeveloper/Library/Caches/node-gyp/12.13.0/include/node/v8.h:2934:10: note: 'NewFromUtf8' has been explicitly marked deprecated here
  static V8_DEPRECATED(
         ^
/Users/syookdeveloper/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
Release/obj.target/appmetrics/geni/appmetrics.cpp:336:51: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations]
        v8::Local<v8::String> v8str = v8::String::NewFromUtf8(v8::Isolate::GetCurrent(), property.c_str());
                                                  ^
/Users/syookdeveloper/Library/Caches/node-gyp/12.13.0/include/node/v8.h:2934:10: note: 'NewFromUtf8' has been explicitly marked deprecated here
  static V8_DEPRECATED(
         ^
/Users/syookdeveloper/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
Release/obj.target/appmetrics/geni/appmetrics.cpp:424:29: warning: 'Call' is deprecated [-Wdeprecated-declarations]
        listener->callback->Call(argc, argv);
                            ^
../../nan/nan.h:1673:3: note: 'Call' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value>
  ^
../../nan/nan.h:103:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
5 warnings and 5 errors generated.
make: *** [Release/obj.target/appmetrics/geni/appmetrics.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/syookdeveloper/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/Users/syookdeveloper/.nvm/versions/node/v12.13.0/bin/node" "/Users/syookdeveloper/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/syookdeveloper/syook/insite/syook-tnt-server/node_modules/appmetrics
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN acorn-dynamic-import@4.0.0 requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN acorn-jsx@5.0.1 requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN node-server@2.8.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! appmetrics@5.1.1 install: `node showBuildInfo.js && node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appmetrics@5.1.1 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/syookdeveloper/.npm/_logs/2019-11-04T10_58_39_581Z-debug.log
mattcolegate commented 4 years ago

@n1th1l The errors in the log you've included aren't coming from appmetrics, but from nan, which is included in appmetrics as a dependency:

../../nan/nan_implementation_12_inl.h:356:37: error: too few arguments to function call
../../nan/nan_implementation_12_inl.h:356:58: error: expected '(' for function-style cast or type construction
../../nan/nan_implementation_12_inl.h:356:60: error: expected expression
../../nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'

Can you check the version of nan being pulled in? Appmetrics specifies 2.x so it should pull the latest version. You might need to run npm update on Appmetrics

nithil commented 4 years ago

This works fine now, issue was with other dependency packages

Ethns commented 4 years ago

npm i appmetrics

appmetrics@5.1.1 install /Users/syookdeveloper/syook/insite/syook-tnt-server/node_modules/appmetrics node showBuildInfo.js && node-gyp rebuild

Mon, 04 Nov 2019 10:58:30 GMT


You are installing the Node Application Metrics monitoring and profiling module. Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.



Appmetrics uses node-gyp to compile and build local binary libraries to enhance execution performance. If the following compilation and build logs contain errors, make sure you have the node-gyp pre-requisites installed (https://github.com/nodejs/node-gyp#installation). If you have them and the build still had errors, see if there are any related issues at https://github.com/RuntimeTools/appmetrics/issues). If there aren't, feel free to open a new issue to report the bug.


ACTION binding_gyp_appmetrics_target_Set_appmetrics_reported_version_build_level Release/obj.target/appmetrics/geni/appmetrics.cpp infile: ./src/appmetrics.cpp outfile: /Users/syookdeveloper/syook/insite/syook-tnt-server/node_modules/appmetrics/build/Release/obj.target/appmetrics/geni/appmetrics.cpp Replacing '"99.99.99.29991231"' with '"5.1.1.201911041628"' CXX(target) Release/obj.target/appmetrics/geni/appmetrics.o In file included from Release/obj.target/appmetrics/geni/appmetrics.cpp:22: In file included from ../../nan/nan.h:222: In file included from ../../nan/nan_converters.h:67: ../../nan/nan_converters_43_inl.h:22:1: warning: 'ToBoolean' is deprecated: ToBoolean can never throw. Use Local version. [-Wdeprecated-declarations] X(Boolean) ^ ../../nan/nan_converters_43_inl.h:18:12: note: expanded from macro 'X' val->To ## TYPE(isolate->GetCurrentContext()) \ ^

:147:1: note: expanded from here ToBoolean ^ /Users/syookdeveloper/Library/Caches/node-gyp/12.13.0/include/node/v8.h:2567:3: note: 'ToBoolean' has been explicitly marked deprecated here V8_DEPRECATED("ToBoolean can never throw. Use Local version.", ^ /Users/syookdeveloper/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator __attribute__((deprecated(message))) ^ In file included from Release/obj.target/appmetrics/geni/appmetrics.cpp:22: In file included from ../../nan/nan.h:222: In file included from ../../nan/nan_converters.h:67: ../../nan/nan_converters_43_inl.h:40:1: warning: 'BooleanValue' is deprecated: BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations] X(bool, Boolean) ^ ../../nan/nan_converters_43_inl.h:37:15: note: expanded from macro 'X' return val->NAME ## Value(isolate->GetCurrentContext()); \ ^ :154:1: note: expanded from here BooleanValue ^ /Users/syookdeveloper/Library/Caches/node-gyp/12.13.0/include/node/v8.h:2605:3: note: 'BooleanValue' has been explicitly marked deprecated here V8_DEPRECATED("BooleanValue can never throw. Use Isolate version.", ^ /Users/syookdeveloper/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator __attribute__((deprecated(message))) ^ In file included from Release/obj.target/appmetrics/geni/appmetrics.cpp:22: In file included from ../../nan/nan.h:223: In file included from ../../nan/nan_new.h:189: ../../nan/nan_implementation_12_inl.h:356:37: error: too few arguments to function call, expected 2, have 1 return v8::StringObject::New(value).As(); ~~~~~~~~~~~~~~~~~~~~~ ^ /Users/syookdeveloper/Library/Caches/node-gyp/12.13.0/include/node/v8.h:5426:3: note: 'New' declared here static Local New(Isolate* isolate, Local value); ^ In file included from Release/obj.target/appmetrics/geni/appmetrics.cpp:22: In file included from ../../nan/nan.h:223: In file included from ../../nan/nan_new.h:189: ../../nan/nan_implementation_12_inl.h:356:58: error: expected '(' for function-style cast or type construction return v8::StringObject::New(value).As(); ~~~~~~~~~~~~~~~~^ ../../nan/nan_implementation_12_inl.h:356:60: error: expected expression return v8::StringObject::New(value).As(); ^ In file included from Release/obj.target/appmetrics/geni/appmetrics.cpp:22: In file included from ../../nan/nan.h:2722: ../../nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistent >' assert(persistent().IsNearDeath()); ~~~~~~~~~~~~ ^ /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 Release/obj.target/appmetrics/geni/appmetrics.cpp:22: In file included from ../../nan/nan.h:2722: ../../nan/nan_object_wrap.h:127:26: error: no member named 'IsNearDeath' in 'Nan::Persistent >' assert(wrap->handle_.IsNearDeath()); ~~~~~~~~~~~~~ ^ /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 Release/obj.target/appmetrics/geni/appmetrics.cpp:25: In file included from ../src/plugins/node/prof/watchdog.h:21: ../src/plugins/node/prof/compat-inl.h:352:22: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations] return v8::String::NewFromUtf8( ^ /Users/syookdeveloper/Library/Caches/node-gyp/12.13.0/include/node/v8.h:2934:10: note: 'NewFromUtf8' has been explicitly marked deprecated here static V8_DEPRECATED( ^ /Users/syookdeveloper/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator __attribute__((deprecated(message))) ^ Release/obj.target/appmetrics/geni/appmetrics.cpp:336:51: warning: 'NewFromUtf8' is deprecated: Use maybe version [-Wdeprecated-declarations] v8::Local v8str = v8::String::NewFromUtf8(v8::Isolate::GetCurrent(), property.c_str()); ^ /Users/syookdeveloper/Library/Caches/node-gyp/12.13.0/include/node/v8.h:2934:10: note: 'NewFromUtf8' has been explicitly marked deprecated here static V8_DEPRECATED( ^ /Users/syookdeveloper/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator __attribute__((deprecated(message))) ^ Release/obj.target/appmetrics/geni/appmetrics.cpp:424:29: warning: 'Call' is deprecated [-Wdeprecated-declarations] listener->callback->Call(argc, argv); ^ ../../nan/nan.h:1673:3: note: 'Call' has been explicitly marked deprecated here NAN_DEPRECATED inline v8::Local ^ ../../nan/nan.h:103:40: note: expanded from macro 'NAN_DEPRECATED' # define NAN_DEPRECATED __attribute__((deprecated)) ^ 5 warnings and 5 errors generated. make: *** [Release/obj.target/appmetrics/geni/appmetrics.o] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/Users/syookdeveloper/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:210:5) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) gyp ERR! System Darwin 17.7.0 gyp ERR! command "/Users/syookdeveloper/.nvm/versions/node/v12.13.0/bin/node" "/Users/syookdeveloper/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/syookdeveloper/syook/insite/syook-tnt-server/node_modules/appmetrics gyp ERR! node -v v12.13.0 gyp ERR! node-gyp -v v5.0.5 gyp ERR! not ok npm WARN acorn-dynamic-import@4.0.0 requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself. npm WARN acorn-jsx@5.0.1 requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself. npm WARN node-server@2.8.0 No repository field. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! appmetrics@5.1.1 install: `node showBuildInfo.js && node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the appmetrics@5.1.1 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/syookdeveloper/.npm/_logs/2019-11-04T10_58_39_581Z-debug.log

I encountered the exactly same issue in windows 7