本文介绍了错误:函数predoploy错误:命令以非零退出码终止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用cmd提示符部署Firebase angular js Web应用程序功能:
I am trying to deploy my firebase angular js web app functions using cmd prompt :
firebase deploy --only functions
但是我不断收到错误代码:
however I keep getting the error code :
C:\Users\deji\Desktop\TNF>firebase deploy --only functions
=== Deploying to 'fantasyapp-a5717'...
i deploying functions
Running command: npm --prefix %RESOURCE_DIR% run lint
> functions@ lint C:\Users\deji\Desktop\TNF\functions
> eslint .
C:\Users\deji\Desktop\TNF\functions\index.js
17:5 error Expected catch() or return promise/catch-or-return
17:54 error Each then() should return a value or throw promise/always-return
17:54 warning Unexpected function expression prefer-arrow-callback
19:9 error Expected catch() or return promise/catch-or-return
19:9 warning Avoid nesting promises promise/no-nesting
21:9 warning Unexpected function expression prefer-arrow-callback
21:9 error Each then() should return a value or throw promise/always-return
25:54 warning Unexpected function expression prefer-arrow-callback
29:25 warning Unexpected function expression prefer-arrow-callback
37:8 error Expected catch() or return promise/catch-or-return
37:8 warning Avoid nesting promises promise/no-nesting
37:52 warning Unexpected function expression prefer-arrow-callback
37:52 error Each then() should return a value or throw promise/always-return
✖ 13 problems (6 errors, 7 warnings)
0 errors, 5 warnings potentially fixable with the `--fix` option.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! functions@ lint: `eslint .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the functions@ lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\deji\AppData\Roaming\npm-cache\_logs\2018-02-16T08_19_43_651Z-debug.log
Error: functions predeploy error: Command terminated with non-zero exit code1
有没有办法解决这个问题?
Is there a way to fix this?
推荐答案
您可以删除firebase.json中"predeploy"下的所有内容,并且它将停止运行引起问题的脚本.
You can remove everything under "predeploy" in firebase.json, and it'll stop running the script which is causing issues.
这篇关于错误:函数predoploy错误:命令以非零退出码终止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!