Encountering an error when attempting to deploy the initial code provided by firebase init
for cloud functions and calling firebase deploy
. The source code within index.ts
remains unmodified, just like the rest of the project.
Running command: npm --prefix "$RESOURCE_DIR" run build
> functions@ build /Users/eliasdolinsek/development/firebase-development/functions
> tsc
../../../node_modules/@types/fs-extra/index.d.ts:195:87 - error TS2694: Namespace '"fs"' does not have an exported member 'Dir'.
195 export function opendir(path: string, cb: (err: NodeJS.ErrnoException | null, dir: fs.Dir) => void): void;
~~~
../../../node_modules/@types/fs-extra/index.d.ts:198:17 - error TS2694: Namespace '"fs"' does not have an exported member 'OpenDirOptions'.
198 options: fs.OpenDirOptions,
~~~~~~~~~~~~~~
../../../node_modules/@types/fs-extra/index.d.ts:199:53 - error TS2694: Namespace '"fs"' does not have an exported member 'Dir'.
199 cb: (err: NodeJS.ErrnoException | null, dir: fs.Dir) => void,
~~~
../../../node_modules/@types/fs-extra/index.d.ts:201:52 - error TS2694: Namespace '"fs"' does not have an exported member 'OpenDirOptions'.
201 export function opendir(path: string, options?: fs.OpenDirOptions): Promise<fs.Dir>;
~~~~~~~~~~~~~~
../../../node_modules/@types/fs-extra/index.d.ts:201:80 - error TS2694: Namespace '"fs"' does not have an exported member 'Dir'.
201 export function opendir(path: string, options?: fs.OpenDirOptions): Promise<fs.Dir>;
~~~
Found 5 errors.
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 likely not a problem with npm. Additional logging output may be present above.
npm ERR! A detailed log of this run can be found in:
npm ERR! /Users/eliasdolinsek/.npm/_logs/2021-01-26T13_18_50_649Z-debug.log
Error: functions predeploy error: Command terminated with non-zero exit code 2