部署Firebase云功能时发生意外错误

时间:2019-05-13 19:42:34

标签: javascript google-cloud-functions firebase-cli

我第一次使用Firebase可以运行。我在部署功能时遇到问题。它给了我下面的错误:

error in my termimal

下面是我的package.json文件:

{
  "name": "functions",
  "description": "Cloud Functions for Firebase",
  "scripts": {
  "lint": "eslint .",
  "serve": "firebase serve --only functions",
  "shell": "firebase functions:shell",
  "start": "npm run shell",
  "deploy": "firebase deploy --only functions",
  "logs": "firebase functions:log"
},
 "engines": {
 "node": "8"
},
"dependencies": {
 "@google-cloud/logging": "^4.5.2",
 "firebase-admin": "^7.3.0",
 "firebase-functions": "^2.3.1",
 "stripe": "^6.34.0"
},
"devDependencies": {
 "eslint": "^5.12.0",
 "eslint-plugin-promise": "^4.0.1",
 "firebase-functions-test": "^0.1.6"
 },
"private": true
}

下面是日志:

  

TypeError:无法读取未定义的属性'pipesCount'       在module.exports.Readable.pipe(_stream_visible.js:545:16)       在module.exports.ZipArchiveOutputStream._smartStream上(/home/appinventiv-pc/.nvm/versions/node/v8.0.0/lib/node_modules/firebase-tools/node_modules/compress-commons/lib/archivers/zip/zip-archive -output-stream.js:184:11)       在module.exports.ZipArchiveOutputStream._appendBuffer(/home/appinventiv-pc/.nvm/versions/node/v8.0.0/lib/node_modules/firebase-tools/node_modules/compress-commons/lib/archivers/zip/zip-archive中-output-stream.js:82:10)       在module.exports.ArchiveOutputStream.entry(/home/appinventiv-pc/.nvm/versions/node/v8.0.0/lib/node_modules/firebase-tools/node_modules/compress-commons/lib/archivers/archive-output-stream中.js:86:10)       在module.exports.ZipStream.entry(/home/appinventiv-pc/.nvm/versions/node/v8.0.0/lib/node_modules/firebase-tools/node_modules/zip-stream/index.js:157:49)       在Zip.append(/home/appinventiv-pc/.nvm/versions/node/v8.0.0/lib/node_modules/firebase-tools/node_modules/archiver/lib/plugins/zip.js:54:15)       在Archiver._moduleAppend(/home/appinventiv-pc/.nvm/versions/node/v8.0.0/lib/node_modules/firebase-tools/node_modules/archiver/lib/core.js:179:16)中       在Archiver._onQueueTask(/home/appinventiv-pc/.nvm/versions/node/v8.0.0/lib/node_modules/firebase-tools/node_modules/archiver/lib/core.js:400:8)中       在/home/appinventiv-pc/.nvm/versions/node/v8.0.0/lib/node_modules/firebase-tools/node_modules/async/dist/async.js:4096:9       在Object.process(/home/appinventiv-pc/.nvm/versions/node/v8.0.0/lib/node_modules/firebase-tools/node_modules/async/dist/async.js:2344:17)

如果我需要提供其他信息,请告诉我。我是Firebase云功能和节点的新手。

1 个答案:

答案 0 :(得分:1)

您所使用的节点(8.0.0)的版本非常旧,但存在错误。将节点版本升级到最新版本。

(我通过搜索您的错误消息找到了此信息。)