Skip to content

Wrong "typings" key in package.json after monorepo refactor. #136

@adamduren

Description

@adamduren

Reproduction steps

See repo to reproduce.

Description

The path for typings is missing the cjs directory.

"typings": "dist/index.d.ts",

Should be

"typings": "dist/cjs/index.d.ts",

Noticed in the following places:

Results in the following error during compilation with tsc

node_modules/@firebase/database/dist/cjs/index.d.ts(16,35): error TS7016: Could not find a declaration file for module '@firebase/app'. '/workspace/functions/node_modules/@firebase/app/dist/cjs/index.js' implicitly has an 'any' type.
node_modules/@firebase/database/dist/cjs/src/api/Database.d.ts(3,46): error TS7016: Could not find a declaration file for module '@firebase/app'. '/workspace/functions/node_modules/@firebase/app/dist/cjs/index.js' implicitly has an 'any' type.
  Try `npm install @types/@firebase/app` if it exists or add a new declaration (.d.ts) file containing `declare module '@firebase/app';`
node_modules/@firebase/database/dist/cjs/src/core/AuthTokenProvider.d.ts(16,52): error TS7016: Could not find a declaration file for module '@firebase/app'.'/workspace/functions/node_modules/@firebase/app/dist/cjs/index.js' implicitly has an 'any' type.
  Try `npm install @types/@firebase/app` if it exists or add a new declaration (.d.ts) file containing `declare module '@firebase/app';`
node_modules/@firebase/database/dist/cjs/src/core/Repo.d.ts(3,29): error TS7016: Could not find a declaration file for module '@firebase/app'. '/workspace/functions/node_modules/@firebase/app/dist/cjs/index.js' implicitly has an 'any' type.
  Try `npm install @types/@firebase/app` if it exists or add a new declaration (.d.ts) file containing `declare module '@firebase/app';`

Environment

  • Node Version: v8.9.1 (also tried 6.x, 7.x)
  • NPM Version: v5.5.1
  • TypeScript Version: v2.4.2 / v2.6.1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions