While trying to follow the Add Firebase to your JavaScript project on an empty git repository that will be used for a TypeScript project, I got the following error when I ran firebase deploy
:
> functions@ build /Users/mosofsky/Documents/Developer/abcplan/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/mosofsky/.npm/_logs/2019-09-06T03_00_54_557Z-debug.log
Error: functions predeploy error: Command terminated with non-zero exit code2
Since I'm following Google's getting-started guide, I expected everything to work.