instana / nodejs

Node.js in-process collectors for Instana
MIT License
69 stars 36 forks source link

v8 profiler binaries can no longer be downloaded #19

Closed bripkens closed 6 years ago

bripkens commented 6 years ago

See https://github.com/node-inspector/v8-profiler/issues/117

ingo-eichhorst commented 6 years ago

The problem seems be recurring:

npm install instana-nodejs-sensor and npm install v8-profiler fails

os: MacOS 10.13.6 instana-nodejs-sensor: 1.48.1

lead to (note: replaced absolute paths with ...):

> v8-profiler@5.7.0 preinstall .../node_modules/v8-profiler
> node -e 'process.exit(0)'

> @risingstack/v8-profiler@5.7.11 preinstall .../node_modules/@risingstack/v8-profiler
> node -e 'process.exit(0)'

> @risingstack/v8-profiler@5.7.11 install .../node_modules/@risingstack/v8-profiler
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(404): https://oss.risingstack.com/repo/v1/@risingstack/profiler/dist/v5.7.11/node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for @risingstack/v8-profiler@5.7.11 and node@10.10.0 (node-v64 ABI,unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://oss.risingstack.com/repo/v1/@risingstack/profiler/dist/v5.7.11/node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for @risingstack/v8-profiler@5.7.11 and node@10.10.0 (node-v64 ABI,unknown) (falling back to source compile with node-gyp)
  CXX(target) Release/obj.target/profiler/src/profiler.o
  CXX(target) Release/obj.target/profiler/src/profiler.o
sed: ./Release/.deps/Release/obj.target/profiler/src/profiler.o.d.raw: No such file or directory
make: *** [Release/obj.target/profiler/src/profiler.o] Error 1
gyp  CXX(target) Release/obj.target/profiler/src/cpu_profiler.o
 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:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=.../node_modules/@risingstack/v8-profiler/build/@risingstack/profiler/v5.7.11/node-v64-darwin-x64/profiler.node" "--module_name=profiler" "--module_path=.../node_modules/@risingstack/v8-profiler/build/@risingstack/profiler/v5.7.11/node-v64-darwin-x64"
gyp ERR! cwd .../node_modules/@risingstack/v8-profiler
gyp ERR! node -v v10.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
basti1302 commented 6 years ago

Hi Ingo,

please note that @risingstack/v8-profiler is an optional dependency of the instana-nodejs-sensor, so even if it can be neither downloaded nor compiled via node-gyp (as is currently the status-quo for Node 10, unfortunately), the instana-nodejs-sensor package will actually install and work just fine. You will not be able to gather CPU profiles, but everything else will work as expected.

npm is quite chatty about failures even for optional dependencies, so that's why you see all the gyp ERR! stuff during npm install. This can be misleading.

Did your npm install actually exit with a non-zero exit code? If so, v8-profiler can't be the reason, there must be something else that has gone wrong.

Closing this for now, since the issue is more misleading than helpful.

I see you have also created a support ticket, let's continue the discussion there.

ahtik commented 6 years ago

CPU profiling is still a good feature of Instana and would be nice to see them supported with Node 10.

basti1302 commented 6 years ago

FWIW, we replaced the v8-profiler package with profiler bindings that work across all versions, including Node 10, so this should no longer be an issue.