Firebase,TypeError:无法读取未定义的属性“错误”

时间:2018-11-01 09:44:58

标签: node.js firebase firebase-hosting

每当我尝试将文件部署到Firebase Hosting时,都会不断出现以下错误:

 [2018-11-01T09:36:18.073Z] <<< HTTP RESPONSE BODY undefined
 [2018-11-01T09:36:18.075Z] TypeError: Cannot read property 'error' of undefined
     at module.exports (C:\Users\dilzy\AppData\Roaming\npm\node_modules\firebase-tools\lib\responseToError.js:10:13)
     at Request._callback (C:\Users\dilzy\AppData\Roaming\npm\node_modules\firebase-tools\lib\api.js:47:25)
     at Request.self.callback (C:\Users\dilzy\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\request\request.js:185:22)
     at Request.emit (events.js:182:13)
     at Request.EventEmitter.emit (domain.js:442:20)
     at Request.<anonymous> (C:\Users\dilzy\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\request\request.js:1157:10)
     at Request.emit (events.js:182:13)
     at Request.EventEmitter.emit (domain.js:442:20)
     at IncomingMessage.<anonymous> (C:\Users\dilzy\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\request\request.js:1079:12)
     at Object.onceWrapper (events.js:273:13)

Error: An unexpected error has occurred.

不确定为什么会发生这种情况,并且正常部署可以正常进行到现在。 谢谢

1 个答案:

答案 0 :(得分:3)

更新firebase-tools对我来说是固定的:npm install -g firebase-tools