@firebase/[email protected] imports @firebase/logger in its type declarations (index.d.ts):
import { LogCallback, LogLevelString, LogOptions } from '@firebase/logger';
However, the package.json declares this under a "dependency" field (singular) instead of the correct "dependencies" (plural):
"dependency": {
"@firebase/logger": "0.2.6"
}
Package managers ignore the misspelled field, so @firebase/logger is never resolved as a dependency. This works in flat node_modules layouts (npm, yarn) because @firebase/logger is hoisted from other @firebase/* packages in the tree. When pnpm hoisting is disabled (hoist: false), this fails with:
error TS2307: Cannot find module '@firebase/logger' or its corresponding type declarations.
Workaround:
packageExtensions:
"@firebase/app-types@0":
peerDependencies:
"@firebase/logger": "*"
Suggested fix: Rename the "dependency" field to "dependencies" in @firebase/app-types's package.json.
@firebase/[email protected]imports@firebase/loggerin its type declarations (index.d.ts):However, the
package.jsondeclares this under a"dependency"field (singular) instead of the correct"dependencies"(plural):Package managers ignore the misspelled field, so
@firebase/loggeris never resolved as a dependency. This works in flatnode_moduleslayouts (npm, yarn) because@firebase/loggeris hoisted from other@firebase/*packages in the tree. When pnpm hoisting is disabled (hoist: false), this fails with:Workaround:
Suggested fix: Rename the
"dependency"field to"dependencies"in@firebase/app-types'spackage.json.