Wrong "typings" key in package.json after monorepo refactor.
See original GitHub issueReproduction 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:
- https://github.com/firebase/firebase-js-sdk/blob/master/packages/app/package.json#L50
- https://github.com/firebase/firebase-js-sdk/blob/master/packages/messaging/package.json#L48
- https://github.com/firebase/firebase-js-sdk/blob/master/packages/storage/package.json#L45
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
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:8 (1 by maintainers)
Top Results From Across the Web
[question] all my package.json's now contain gitHead key ...
Please answer few questions about gitHead key which appears on all package.json files after publish . I didn't see any explanations of it...
Read more >MonoRepos with TypeScript - Reddit
I've been playing with AWS Lambda recently, and want to be able to use TypeScript for this. However, I also want to structure...
Read more >The Case for Monorepos: A sane Workspace Setup (Part 2)
Learn how to setup dev tooling in a monorepo, run tasks efficiently, release multiple packages and overcome common DevOps challenges.
Read more >Issues building a TypeScript monorepo project - Stack Overflow
Now the repository follows the following layout: |- example/ | |- index.ts | |- package.json | `- tsconfig.json |- packages/ | |- ...
Read more >Setup monorepo for React components using TypeScript
After that, add eslint configuration. You can create .eslintrc.json file or add eslintConfig key to package.json, with the following ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This should be fixed in the 5.5.1 release. We no longer use the typings from
@firebase/database
.@jshcrowthe is working separately on getting the typings of
@firebase/database
sorted out. Hopefully we will be able to consume them in the admin SDK in the future.Issue appears open for me