You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey everyone, I just started with the first tutorial "Getting Started with Cloud Functions for Firebase using TypeScript - Firecasts" on YouTube.
While trying to deploy the code, I get the error shown below.
Device: Macbook Pro
Node version: v12.16.3
Typescript version: version 3.8.3
Expected behavior
Deploy successfully
Actual behavior
vijayraja@Vijays-MBP functions % firebase deploy
=== Deploying to 'pleasework-770e8'...
i deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run lint
> functions@ lint /Users/vijayraja/newfire/functions
> tslint --project tsconfig.json
Running command: npm --prefix "$RESOURCE_DIR" run build
> functions@ build /Users/vijayraja/newfire/functions
> tsc
src/index.ts:1:1 - error TS6133: 'functions' is declared but its value is never read.
1 import * as functions from 'firebase-functions';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 1 error.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! functions@ build: `tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the functions@ build 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/vijayraja/.npm/_logs/2020-04-29T06_39_58_655Z-debug.log
Error: functions predeploy error: Command terminated with non-zero exit code2
I have attached the all the screenshots below:
Error:
My index.ts file :
Firebase.json file:
tsconfig.json file:
package.json file:
I'm aware there are other threads with the same issue, but I tried all of them, none of them worked.
What I tried doing:
@Vijay1126 did you save your index.ts file before trying to deploy? That's a linter error that's saying the functions variable defined in line 1 of index.ts isn't used. You use it in line 6, so I think it's just a matter of saving that file and trying again 😄
Hey everyone, I just started with the first tutorial "Getting Started with Cloud Functions for Firebase using TypeScript - Firecasts" on YouTube.
While trying to deploy the code, I get the error shown below.
Device: Macbook Pro
Node version: v12.16.3
Typescript version: version 3.8.3
Expected behavior
Deploy successfully
Actual behavior
I have attached the all the screenshots below:
Error:
My index.ts file :
Firebase.json file:
tsconfig.json file:
package.json file:
I'm aware there are other threads with the same issue, but I tried all of them, none of them worked.
What I tried doing:
Please help.
The text was updated successfully, but these errors were encountered: