Skip to content


Subversion checkout URL

You can clone with
Download ZIP


TypeError: log has no method log #12

Arnavion opened this Issue · 3 comments

3 participants


file.js imports './log' as out and then attempts to call out.log. However the function log exported by log.js has no such method.

Full trace is below (I got it when building Typescript via jake but it's not specific to that):

TypeError: Object function (obj) {
  _output(obj, 'info');
} has no method 'log'
    at logger.log (C:\Stuff\Sources\typescript\node_modules\jake\node_modules\utilities\lib\file.js:35:9)
    at EventEmitter.fileUtils.cpR (C:\Stuff\Sources\typescript\node_modules\jake\node_modules\utilities\lib\file.js:251:14)
    at null.action (C:\Stuff\Sources\typescript\Jakefile:300:9)
    at (C:\Stuff\Sources\typescript\node_modules\jake\lib\task\task.js:199:27)
    at TaskBase.handlePrereqComplete (C:\Stuff\Sources\typescript\node_modules\jake\lib\task\task.js:181:12)
    at null.<anonymous> (C:\Stuff\Sources\typescript\node_modules\jake\lib\task\task.js:149:16)
    at g (events.js:180:16)
    at EventEmitter.emit (events.js:92:17)
    at FileBase.complete (C:\Stuff\Sources\typescript\node_modules\jake\lib\task\file_task.js:92:10)
    at api.complete (C:\Stuff\Sources\typescript\node_modules\jake\lib\api.js:287:15)

I fixed it for myself by adding log.log = log; to log.js


Loglevel 'log' absent in log.js, since file.js have been fixed recently to inculde logger right way, jake functionality is broken now.

@kwarismian kwarismian referenced this issue from a commit in kwarismian/utilities
@kwarismian kwarismian Available log methods are bound by the output _levels. Levels was mis…
…sing the basic 'log' level as well as some expected console api methods like warn. Modified to use warn and info for warn and info, and add log to the levels to resolve 'log has no method log' issue #12

Adding log.log = log isn't necessary. Log.js already defines methods for each assertion level using the _levels method. The original author just neglected to consider regular old "log" a valid level of logging importance. Add , 'log' : 'log' to _levels and you are good to go. Hopefully my pull request (or a similar fix) is implemented soon, as this was a really nasty surprise for my build task yesterday.


I can confirm that I am able to compile Typescript now. Closing this issue.

@Arnavion Arnavion closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.