我得到msg.trim不是一个function,当试图启动与离子的新应用程序

这里是错误:

TypeError:msg.trim不是Logger.log中的函数(/usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-utils/lib/utils/logger.js:78:21)在Logger.error (/usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-utils/lib/utils/logger.js:35:14)。 (/usr/local/lib/node_modules/ionic/dist/index.js:186:22)在Generator.throw()被拒绝(/usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js: 101:69)at

这是我正在运行的命令:

$ ionic启动myApp

我的node.js版本是v8.9.1 ,npm是5.5.1

这是我在logger.js文件中find的

log(level, msg) { if (this.shouldLog(level)) { let prefix = this.prefix; if (typeof msg === 'function') { msg = msg(); } if (prefix) { if (typeof prefix === 'function') { prefix = prefix(); } msg = util.format(prefix, msg); } const color = this.getStatusColor(level); const status = color.bold.bgBlack; const b = chalk_1.default.dim; const msgLines = format_1.wordWrap(msg, { indentation: level === 'info' ? 0 : level.length + 3 }).split('\n'); if (msg.trim().includes('\n')) { msg = msgLines.map((l, i) => { // We want these log messages to stand out a bit, so automatically // color the first line and separate the first line from the other // lines if the message is multi-lined. if (i === 0 && this.firstLineColored.includes(level)) { return color(l) + (msgLines.length > 1 ? '\n' : ''); } return l; }).join('\n') + '\n\n'; } else { msg = msgLines.join('\n'); } msg = this.enforceLF(msg); const fmtLevel = () => b('[') + status(level.toUpperCase()) + b(']'); if (level !== 'info') { msg = `${fmtLevel()} ${msg}`; } this.stream.write(util.format(msg)); }