【问题标题】:Firebase Deployment Error for Google AssistantGoogle 助理的 Firebase 部署错误
【发布时间】:2018-08-18 19:43:59
【问题描述】:
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

【问题讨论】:

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


    【解决方案1】:

    您在 index.js 中有一个 lint 错误:

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

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

    【讨论】:

    • ESLint 是做什么的?
    • 谢谢!我已经定义了两次 const 函数。现在它工作正常。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-10-26
    • 2018-12-02
    • 2021-04-10
    • 2019-02-26
    • 2016-03-23
    • 2017-12-12
    相关资源
    最近更新 更多