TypeError: mod.hasOwnProperty не является функцией в extractTriggers (/usr/local/lib/node_modules/firebase-tools/lib/extractTriggers.js:5:17) в extractTriggers (/ usr / local / lib/node_modules/firebase-tools/lib/extractTriggers.js:22:17) в /usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:589:38 в Generator.next () выполнен(/usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:4:58) at at process._tickCallback (internal / process / next_tick.js: 189: 7) в Function.Module.runMain(module.js: 696: 11) при запуске (bootstrap_node.js: 204: 16) в bootstrap_node.js: 625: 3 ⚠ Ваша функция была убита, поскольку вызвала необработанную ошибку.
здесьis package.json
{
"name": "firebase-functions-es6-example",
"version": "1.0.0",
"description": "Use ES6 to develop Cloud Functions for Firebase today!",
"license": "MIT",
"devDependencies": {
"@babel/cli": "^7.4.4",
"@babel/core": "^7.4.5",
"@babel/node": "^7.4.5",
"@babel/plugin-proposal-object-rest-spread": "^7.4.4",
"@babel/plugin-transform-runtime": "^7.4.4",
"@babel/preset-env": "^7.4.5",
"rimraf": "^2.6.2"
},
"scripts": {
"deploy": "npm run package-functions && firebase serve --only functions,hosting",
"prepackage-functions": "rimraf functions",
"package-functions": "babel 'functionsES6' --out-dir 'functions' --presets=@babel/env --plugins=@babel/plugin-proposal-object-rest-spread,@babel/plugin-transform-runtime --copy-files --ignore 'node_modules'",
"postpackage-functions": "cd functions && npm i"
},
"dependencies": {
"@babel/runtime": "^7.4.5",
"firebase-functions": "^3.0.2"
}
}