firebase deploy 找不到与模式“'src/**/*'”匹配的文件

firebase deploy No files matching the pattern "'src/**/*'" were found

我正在尝试在 firebase 上部署我的第一个云函数,但问题是它总是说出了点问题,没有文件匹配模式我不知道为什么 index.ts 就在它的位置应该是 错误代码是

=== Deploying to 'mscmu-aeab1'...

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

> functions@ lint C:\Users\fahmi\msc_mu\cloud_functions\functions
> eslint 'src/**/*'


Oops! Something went wrong! :(

ESLint: 7.9.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! Exit status 2
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\fahmi\AppData\Roaming\npm-cache\_logs20-09-26T22_01_33_578Z-debug.log

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


https://i.imgur.com/rb10Tsi.png

在您的函数中 package.json 编辑 lint 脚本如下:

eslint --ext .ts src

此问题已在 this 提交中解决。

在您的 functions 文件夹中打开 package.json 并像这样编辑以 lint 开头的行:

"lint": "eslint \"src/**/*\""

此问题已通过 Firebase CLI version 8.12.0. The update is to escape quotes around the argument to eslint as shown in this commit 解决。