Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

npm install v8-profiler fails with node v7.0.0 on osx #98

Open
sometimeskind opened this issue Oct 26, 2016 · 21 comments
Open

npm install v8-profiler fails with node v7.0.0 on osx #98

sometimeskind opened this issue Oct 26, 2016 · 21 comments

Comments

@sometimeskind
Copy link

/tmp/test $ npm install v8-profiler

> v8-profiler@5.6.5 preinstall /private/tmp/test/node_modules/.staging/v8-profiler-dad6496d
> node -e 'process.exit(0)'


> v8-profiler@5.6.5 install /private/tmp/test/node_modules/v8-profiler
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(404): https://node-inspector.s3.amazonaws.com/profiler/v5.6.5/node-v51-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for v8-profiler@5.6.5 and node@7.0.0 (node-v51 ABI) (falling back to source compile with node-gyp)
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
  CXX(target) Release/obj.target/profiler/src/profiler.o
  CXX(target) Release/obj.target/profiler/src/cpu_profiler.o
  CXX(target) Release/obj.target/profiler/src/cpu_profile.o
  CXX(target) Release/obj.target/profiler/src/cpu_profile_node.o
  CXX(target) Release/obj.target/profiler/src/heap_profiler.o
../src/heap_profiler.cc:35:18: warning: 'TryCatch' is deprecated [-Wdeprecated-declarations]
        TryCatch try_catch;
                 ^
/Users/tomruttle/.node-gyp/7.0.0/include/node/v8.h:7015:40: note: 'TryCatch' has been explicitly marked deprecated here
  V8_DEPRECATED("Use isolate version", TryCatch());
                                       ^
1 warning generated.
  CXX(target) Release/obj.target/profiler/src/heap_snapshot.o
../src/heap_snapshot.cc:46:46: error: no member named 'GetHiddenValue' in 'v8::Object'
      info.GetReturnValue().Set(info.This()->GetHiddenValue(__root));
                                ~~~~~~~~~~~  ^
../src/heap_snapshot.cc:50:20: error: no member named 'SetHiddenValue' in 'v8::Object'
      info.This()->SetHiddenValue(__root, _root);
      ~~~~~~~~~~~  ^
2 errors generated.
make: *** [Release/obj.target/profiler/src/heap_snapshot.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/tomruttle/.nvm/versions/node/v7.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.1.0
gyp ERR! command "/Users/tomruttle/.nvm/versions/node/v7.0.0/bin/node" "/Users/tomruttle/.nvm/versions/node/v7.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/private/tmp/test/node_modules/v8-profiler/build/profiler/v5.6.5/node-v51-darwin-x64/profiler.node" "--module_name=profiler" "--module_path=/private/tmp/test/node_modules/v8-profiler/build/profiler/v5.6.5/node-v51-darwin-x64"
gyp ERR! cwd /private/tmp/test/node_modules/v8-profiler
gyp ERR! node -v v7.0.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/tomruttle/.nvm/versions/node/v7.0.0/bin/node /Users/tomruttle/.nvm/versions/node/v7.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/private/tmp/test/node_modules/v8-profiler/build/profiler/v5.6.5/node-v51-darwin-x64/profiler.node --module_name=profiler --module_path=/private/tmp/test/node_modules/v8-profiler/build/profiler/v5.6.5/node-v51-darwin-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/private/tmp/test/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:877:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Darwin 16.1.0
node-pre-gyp ERR! command "/Users/tomruttle/.nvm/versions/node/v7.0.0/bin/node" "/private/tmp/test/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /private/tmp/test/node_modules/v8-profiler
node-pre-gyp ERR! node -v v7.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.31
node-pre-gyp ERR! not ok
Failed to execute '/Users/tomruttle/.nvm/versions/node/v7.0.0/bin/node /Users/tomruttle/.nvm/versions/node/v7.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/private/tmp/test/node_modules/v8-profiler/build/profiler/v5.6.5/node-v51-darwin-x64/profiler.node --module_name=profiler --module_path=/private/tmp/test/node_modules/v8-profiler/build/profiler/v5.6.5/node-v51-darwin-x64' (1)
npm WARN test@1.0.0 No description
npm WARN test@1.0.0 No repository field.
npm ERR! Darwin 16.1.0
npm ERR! argv "/Users/tomruttle/.nvm/versions/node/v7.0.0/bin/node" "/Users/tomruttle/.nvm/versions/node/v7.0.0/bin/npm" "install" "v8-profiler"
npm ERR! node v7.0.0
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE

npm ERR! v8-profiler@5.6.5 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the v8-profiler@5.6.5 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the v8-profiler package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs v8-profiler
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls v8-profiler
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /private/tmp/test/npm-debug.log
@MerlinDMC
Copy link

#96 looks like it would fix this

@chemzqm
Copy link

chemzqm commented Nov 17, 2016

Same issue with node-pre-gyp build for electron v1.4.6

@helio-frota
Copy link

Hi folks,
Any updates ?

We have a good tool that generates flamegraph and do some profiling things, and that tool is using v8-profiler, and we can't test against Node.js 7x yet :/

thanks.

@jason-codaio
Copy link

So has this package been abandoned? @3y3

This has been broken for a long time.

@suntopo
Copy link

suntopo commented Jan 22, 2017

is there any offical solution?

@MerlinDMC
Copy link

@suntopo we've switched to the fork from @RisingStack which works on Node 4 to 7

"@risingstack/v8-profiler": "^5.7.0"

https://github.com/RisingStack/v8-profiler

@bonesoul
Copy link

can we get the fix applied here too please? master...RisingStack:master

@sontek
Copy link

sontek commented Mar 11, 2017

Still no update?

@helio-frota
Copy link

@sontek we've switched to the fork from @RisingStack which works on Node 4 to 7

"@risingstack/v8-profiler": "^5.7.0"

https://github.com/RisingStack/v8-profiler

@sontek
Copy link

sontek commented Mar 11, 2017

@helio-frota Yeah, I'd like to do that as well but I'm actually looking to use https://github.com/node-inspector/node-inspector but it depends on v8-profiler

@hustxiaoc
Copy link
Collaborator

Please try v8-profiler@5.7.0 , should work now!

@dbo
Copy link

dbo commented Apr 27, 2017

@hustxiaoc I am getting:

"Error: Cannot find module './build/profiler/v5.7.0/node-v51-darwin-x64/profiler.node' on 5.7.0

The NPM still seems to ship node-v48-darwin-x64.

@FrenziedWarrior
Copy link

I used:
sudo -i
npm install -g v8-profiler

npm WARN lifecycle v8-profiler@5.7.0~preinstall: cannot run in wd %s %s (wd=%s) v8-profiler@5.7.0 node -e 'process.exit(0)' /usr/local/lib/node_modules/.staging/v8-profiler-8a009fdf
v8-profiler@5.7.0 install /usr/local/lib/node_modules/v8-profiler
node-pre-gyp install --fallback-to-build
[v8-profiler] Success: "/usr/local/lib/node_modules/v8-profiler/build/profiler/v5.7.0/node-v48-linux-x64/profiler.node" is installed via remote`

gnmerritt added a commit to gnmerritt/fantasy-got that referenced this issue Jul 15, 2017
@dilame
Copy link

dilame commented Aug 9, 2017

The same problem

$ node -v
v8.2.1

https://gist.github.com/dilame/3e6aba9c9a9ab92a1a1f1ee2acb2bfee

@tankala
Copy link

tankala commented Jul 30, 2018

Hi,

I got the similar problem.
"Error: Cannot find module './build/profiler/v5.7.0/node-v48-linux-x64/profiler.node' on 5.7.0
After spending some time with that figured out that I am using node v7.10.1 at the time of installation and at the time of running the application I am using node v6.11.4.

I uninstalled v8-profiler and used node v6.11.4 using nvm then installed v8-profiler again. Problem solved.

@datdinhquoc
Copy link

@tankala u're downgrading stuff, won't work for long. v8-profiler v8-debug... are dead!

@tankala
Copy link

tankala commented Aug 24, 2018

@datdinhquoc : Not downgrading. What I meant to say is you have multiple node versions installed in your server/system. You need to make sure which node version you are using at the time of module install and at the time of running the application

@datdinhquoc
Copy link

datdinhquoc commented Aug 25, 2018

@tankala that sounds like a workaround, yeah, npm install with node 6, then run with node 8 or 10. hope it works without any incompatibilities

@kevupton
Copy link

Same on node v10

@devarajchidambaram
Copy link

devarajchidambaram commented Oct 23, 2018

This one is installing https://www.npmjs.com/package/v8-profiler-node8

@Philip-Nunoo
Copy link

npm i --save v8-profiler@5.7.0

worked for me. I had to explicitly specify the version

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests