我已经在使用Firebase函数,因此我已经初始化了一个Firebase项目,并且一切都已成功部署。我在Firebase项目目录中使用create-react-app创建了一个React应用。
但是现在,我试图通过运行firebase deploy将整个内容部署到Firebase Hosting,则出现以下错误:
$ firebase deploy
=== Deploying to 'approof-references-debug'...
i deploying functions, hosting
Running command: npm --prefix $RESOURCE_DIR run lint
> functions@ lint /Users/sarbogast/dev/Derbigum/backend/functions
> tslint -p tslint.json
WARNING: /Users/sarbogast/dev/Derbigum/backend/functions/src/index.ts[12, 1]: import with explicit side-effect
WARNING: /Users/sarbogast/dev/Derbigum/backend/functions/src/index.ts[13, 1]: import with explicit side-effect
WARNING: /Users/sarbogast/dev/Derbigum/backend/functions/src/index.ts[14, 1]: import with explicit side-effect
WARNING: /Users/sarbogast/dev/Derbigum/backend/functions/src/index.ts[15, 1]: import with explicit side-effect
WARNING: /Users/sarbogast/dev/Derbigum/backend/functions/src/index.ts[17, 1]: import with explicit side-effect
WARNING: /Users/sarbogast/dev/Derbigum/backend/functions/src/index.ts[18, 1]: import with explicit side-effect
WARNING: /Users/sarbogast/dev/Derbigum/backend/functions/src/index.ts[19, 1]: import with explicit side-effect
WARNING: /Users/sarbogast/dev/Derbigum/backend/functions/src/index.ts[20, 1]: import with explicit side-effect
WARNING: /Users/sarbogast/dev/Derbigum/backend/functions/src/index.ts[21, 1]: import with explicit side-effect
Running command: npm --prefix $RESOURCE_DIR run build
> functions@ build /Users/sarbogast/dev/Derbigum/backend/functions
> tsc
node_modules/firebase-functions/lib/function-builder.d.ts(60,95): error TS1005: ';' expected.
node_modules/firebase-functions/lib/function-builder.d.ts(60,96): error TS1003: Identifier expected.
node_modules/firebase-functions/lib/function-builder.d.ts(60,116): error TS1005: ';' expected.
../node_modules/@types/prop-types/index.d.ts(33,46): error TS1005: ';' expected.
../node_modules/@types/prop-types/index.d.ts(33,75): error TS1005: ';' expected.
...
我并没有包含所有错误,但是它们看起来都一样。 知道可能出什么问题了吗?
答案 0 :(得分:0)
如果您在package.json中指定了Firebase cli,则Firebase cli可能会在部署之前检查棉绒警告。
"lint": "./node_modules/.bin/eslint --max-warnings=0 .",