lloyd / node-memwatch

A NodeJS library to keep an eye on your memory usage, and discover and isolate leaks.
2.51k stars 302 forks source link

magic has no method 'upon_gc' #46

Open dodo opened 11 years ago

dodo commented 11 years ago

on both node v0.8.9 and v0.10.20 i get this error message when running (build went ok):

./include.js:10
magic.upon_gc(function(has_listeners, event, data) {
      ^
TypeError: Object #<Object> has no method 'upon_gc'
    at Object.<anonymous> (./include.js:10:7)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (./examples/basic_heapdiff.js:2:12)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)

I just copied the code style from http://nodejs.org/api/addons.html and it worked again.

I'm using debian sid and nvm.

missinglink commented 8 years ago

:+1: I also get this error on one computer but not another, not sure what's going on here?

the machine in question is a recently rebuilt Ubuntu 15.10 box, is it possible that it's missing some compile tools?