LoginSignup
0
0

More than 3 years have passed since last update.

No files matching the pattern "'src/**/*'" were found. Please check for typing mistakes in the pattern.

Posted at

firebase deployできない

Reactとfirebaseでアプリを作成しているときにエラーが出ました。
同じエラーが出た際、この記事で解決できるように記録として残します。

エラー内容

以下の実行コマンドを行った際、

firebase deploy

このようなエラーが出てしまいました。

> eslint 'src/**/*'


Oops! Something went wrong! :(
ESLint: 7.10.0

No files matching the pattern "'src/**/*'" were found.
Please check for typing mistakes in the pattern.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! functions@ lint: `eslint 'src/**/*'`
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.

と言われ、詳しくエラーを読むと、

functionsフォルダで

'src/**/*'

というのが見つからんぞ!って怒られています。

確認すると、、、

functionsフォルダ内を実際見てみると

"scripts": {
    "lint": "eslint --no-error-on-unmatched-pattern 'src/**/*'",
    "build": "tsc",
    "serve": "npm run build && firebase emulators:start --only functions",
    "shell": "npm run build && firebase functions:shell",
    "start": "npm run shell",
    "deploy": "firebase deploy --only functions",
    "logs": "firebase functions:log"
  },

しっかりと書いてあります。なんじゃこれ。

原因を探る

色々な記事を探りましたが、なかなかできず、、、
(以下は、参考にさせていただいた記事です。)

解決策

とある記事(https://stackoverflow.com/questions/60345326/eslint-no-files-matching-the-pattern-lint-were-found-please-check-for-typing)
で無理やり解決しているのを見つけました。

--no-error-on-unmatched-pattern

エラーを起こしている部分に、これを入れてあげるとよいみたいです。

変更前

"lint": "eslint 'src/**/*'",

変更後

"lint": "eslint --no-error-on-unmatched-pattern 'src/**/*'",

これでdeployできた!!!

0
0
0

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
0
0