简体   繁体   中英

Unexpected error while deploying firebase cloud functions

I am using firebase could functions for the first time. I am having trouble deploying the functions. It gives me the below error:

我的术语错误

Below is my package.json file:

{
  "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
}

Below are the logs:

TypeError: Cannot read property 'pipesCount' of undefined at module.exports.Readable.pipe (_stream_readable.js:545:16) at 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) at 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) at 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) at 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) at 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) at Archiver._moduleAppend (/home/appinventiv-pc/.nvm/versions/node/v8.0.0/lib/node_modules/firebase-tools/node_modules/archiver/lib/core.js:179:16) at Archiver._onQueueTask (/home/appinventiv-pc/.nvm/versions/node/v8.0.0/lib/node_modules/firebase-tools/node_modules/archiver/lib/core.js:400:8) at /home/appinventiv-pc/.nvm/versions/node/v8.0.0/lib/node_modules/firebase-tools/node_modules/async/dist/async.js:4096:9 at Object.process (/home/appinventiv-pc/.nvm/versions/node/v8.0.0/lib/node_modules/firebase-tools/node_modules/async/dist/async.js:2344:17)

If there is any other information i need to provide please let me know. I am new to firebase cloud functions and node.

You are using a very old version of node (8.0.0) that has a bug. Upgrade your node version to something more recent.

(I found this information by doing a search with your error message.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM