LoginSignup
11

More than 3 years have passed since last update.

functions predeploy errorの回避及び対処方法について

Posted at

Firebaseでdeployコマンドを実行したところエラーが発生

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

> functions@ lint /Users/tarou/test/app/functions
> eslint "src/**/*"


/Users/tarou/test/app/functions/src/index.ts
  9:33  error  Missing trailing comma  comma-dangle

✖ 1 problem (1 error, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! functions@ lint: `eslint "src/**/*"`
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/tarou/.npm/_logs/2020-12-03T07_41_54_419Z-debug.log

Error: functions predeploy error: Command terminated with non-zero exit code1

firebase.jsonの中にある、functionsのpredeployをまんま削除し対応

"functions": {
    "predeploy": [
      "npm --prefix \"$RESOURCE_DIR\" run lint"
    ]

↑こんなやつです。(ビルドの記述もあるかも、それも削除)

参考記事(感謝)
firebase deploy時のeslintを無効にする

間違い、または、これはこうしたほうがいいかも?等々ございましたらご指摘いただけますと幸いです。
最後までみていただきありがとうございます。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11