I encountered an issue while trying to deploy a Firebase function for a Flutter application that I am developing in Android Studio. The error message I received during deployment is shown below. Can someone please advise me on how to resolve this?
Running command: npm --prefix "$RESOURCE_DIR" run lint
functions@ lint /Users/johnny/Downloads/flutterApp5/functions eslint .
/Users/johnny/Downloads/flutterApp5/functions/index.js 18:5 error Expected catch() or return
promise/catch-or-return 23:13 error Each then() should return a value or throw promise/always-return 28:13 error Expected catch() or return promise/catch-or-return 28:13 warning Avoid nesting promises
promise/no-nesting 33:21 error Each then() should return a value or throw promise/always-return 45:19 warning Avoid nesting promises promise/no-nesting 45:19 warning Avoid nesting promises promise/no-nesting 48:27 error Each then() should return a value or throw promise/always-return✖ 8 problems (5 errors, 3 warnings)
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!
/Users/johnny/.npm/_logs/2020-06-14T01_33_52_121Z-debug.logError: functions predeploy error: Command terminated with non-zero exit code1