Hello,
I just installed nodejs using nodjs pkg installer on my mac. After that
when I ran node -v, it displays the correct version. However, when I ran
npm --v, I am getting following error:
[TypeError: Object function log(msg, pref, level, cb) {
if (typeof level === "function") cb = level, level = null
var show = log.level
if (show === LEVEL.silent || show === LEVEL.paused) return cb && cb()
if (level == null) level = LEVEL.info
if (isNaN(level)) level = LEVEL[level]
else level = +level
// logging just undefined is almost never the right thing.
// a lot of these are kicking around throughout the codebase
// with relatively unhelpful prefixes.
if (msg === undefined && level > LEVEL.silly) {
msg = new Error("undefined log message")
}
if (typeof msg === "object" && (msg instanceof Error)) level = LEVEL.error
if (!ini.resolved && waitForConfig || level === LEVEL.paused) {
return logBuffer.push([msg, pref, level, cb])
}
if (logBuffer.length && !logBuffer.discharging) {
logBuffer.push([msg, pref, level, cb])
logBuffer.discharging = true
logBuffer.forEach(function (l) { log.apply(null, l) })
logBuffer.length = 0
delete logBuffer.discharging
return
}
log.level = show
npm.emit("log", { level : level, msg : msg, pref : pref, cb : cb })
npm.emit("log."+normalNames[level], { msg : msg, pref : pref, cb : cb })
} has no method 'error']
Any suggestions how can I solve this issue ?
Thanks,
Sahil
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en