anandanand84 / technicalindicators

A javascript technical indicators written in typescript with pattern recognition right in the browser
MIT License
2.14k stars 557 forks source link

Problem installing the package #192

Closed bitcoinvsalts closed 5 years ago

bitcoinvsalts commented 5 years ago

Here is the error log:


      throw new Error('node-gyp rebuild failed with: ' + err);
      ^

Error: node-gyp rebuild failed with: Error: Command failed: node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.3
gyp info using node@12.8.0 | darwin | x64
gyp info find Python using Python version 2.7.15 found at "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python"
gyp http GET https://nodejs.org/download/release/v12.8.0/node-v12.8.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v12.8.0/node-v12.8.0-headers.tar.gz
gyp ERR! UNCAUGHT EXCEPTION 
gyp ERR! stack TypeError: tar.extract is not a function
gyp ERR! stack     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:198:22)
gyp ERR! stack     at Request.emit (events.js:208:15)
gyp ERR! stack     at Request.onRequestResponse (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1066:10)
gyp ERR! stack     at ClientRequest.emit (events.js:203:13)
gyp ERR! stack     at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:575:27)
gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:116:17)
gyp ERR! stack     at TLSSocket.socketOnData (_http_client.js:449:22)
gyp ERR! stack     at TLSSocket.emit (events.js:203:13)
gyp ERR! stack     at addChunk (_stream_readable.js:295:12)
gyp ERR! stack     at readableAddChunk (_stream_readable.js:276:11)
gyp ERR! System Darwin 19.0.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/herve76/Documents/GitHub/nbt-1357/node_modules/@tensorflow/tfjs-node
gyp ERR! node -v v12.8.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>```

it seems to be a problem with the version used for tfjs and tfjs-node.
Using the latest version of both pkg might solve the issue.
bitcoinvsalts commented 5 years ago

I confirm, using the following, fix the issue:


    "@tensorflow/tfjs-node": "^1.2.7",```

https://github.com/jsappme/technicalindicators