Google智能助理的Firebase部署错误

时间:2018-03-10 09:00:41

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

sudo firebase deploy

=== Deploying to 'newproject-81c76'...

i  deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run lint

> functions@ lint /home/bumblebee/Softwares/Firebase/myproject/functions
> eslint .


/home/bumblebee/Softwares/Firebase/myproject/functions/index.js
10:7  error  Parsing error: Identifier 'functions' has already been declared

✖ 1 problem (1 error, 0 warnings)

npm ERR! Linux 4.4.0-116-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "--prefix" "/home/bumblebee/Softwares/Firebase/myproject/functions" "run" "lint"
npm ERR! node v6.13.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! functions@ lint: `eslint .`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the functions@ lint script 'eslint .'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the functions package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     eslint .
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs functions
npm ERR! Or if that isn't available,
npm ERR!     npm owner ls functions
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/bumblebee/Softwares/Firebase/myproject/npm-debug.log

1 个答案:

答案 0 :(得分:1)

index.js中有一个lint错误:

error  Parsing error: Identifier 'functions' has already been declared

听起来你以某种方式定义functions两次。您应该在部署之前修复它,或者禁用ESLint。我建议修理它。