question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
hiranya911commented, Nov 21, 2017

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.

0reactions
adamdurencommented, Nov 19, 2017

Issue appears open for me

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found