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
977 stars 126 forks source link

npm install -g bluemix-autoscaling-agent #605

Closed louiemiranda closed 4 years ago

louiemiranda commented 5 years ago

Was trying to install the node-gyp, under a bluemix-autoscaling-agent. However, it's having a python error.

npm install -g bluemix-autoscaling-agent

> appmetrics@5.0.3 install C:\Users\user\AppData\Roaming\npm\node_modules\bluemix-autoscaling-agent\node_modules\appmetrics
> node showBuildInfo.js && node-gyp rebuild

Thu, 08 Aug 2019 06:59:29 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.
********************************************************************************

C:\Users\user\AppData\Roaming\npm\node_modules\bluemix-autoscaling-agent\node_modules\appmetrics>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\user\AppData\Local\Programs\Python\Python37\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                                ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:281:12)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at maybeClose (internal/child_process.js:915:16)
gyp ERR! stack     at Socket.stream.socket.on (internal/child_process.js:336:11)
gyp ERR! stack     at emitOne (events.js:116:13)
gyp ERR! stack     at Socket.emit (events.js:211:7)
gyp ERR! stack     at Pipe._handle.close [as _onclose] (net.js:561:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\user\AppData\Roaming\npm\node_modules\bluemix-autoscaling-agent\node_modules\appmetrics
gyp ERR! node -v v8.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! appmetrics@5.0.3 install: `node showBuildInfo.js && node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appmetrics@5.0.3 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!     C:\Users\user\AppData\Roaming\npm-cache\_logs\2019-08-08T06_59_32_385Z-debug.log
mattcolegate commented 5 years ago

Hi @louiemiranda, I think this problem is because you're building with Python 3.x, which node-gyp doesn't currently support. Are you able to install Python 2.x and use that to build with? I'm aware that we're right up against Python 2's end of service life, but until node-gyp can use Python 3 there's not a lot we can do about it :-(

louiemiranda commented 5 years ago

Hi @mattcolegate oh, I see. Yes, I can just use Python 2.x for now. Should be no problem. Thanks for the info. Hope the 3.x series can support it in the future.

Again, many thanks !

mattcolegate commented 5 years ago

No problem @louiemiranda, please close this issue if Python 2.x works ok!

mattcolegate commented 5 years ago

@louiemiranda Can this issue be closed now?

mattcolegate commented 4 years ago

Closing this issue as it's been a couple of months with no contact. Please reopen if you are still having problems.