문제

I'm struggling to get node's util functions to output anything from within a spookyJS callback:

var utils = require('utils');
...spooky code...
spooky.on('remote.message', function(msg) {
    utils.log('message'); // does nothing
    this.utils.log('message'); // does nothing
}

Is it possible to access the util functions within a callback like this?

도움이 되었습니까?

해결책

The problem may be that you are trying to require utils instead of util.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top