TypeScript build-time error: `Cannot find type definition file for 'types/cross-fetch'`
See original GitHub issueWhen attempting to build a TypeScript project that has prismic-javascript@3.0.0
as a dependency, I get the following error:
node_modules/prismic-javascript/types/index.d.ts:1:23 - error TS2688: Cannot find type definition file for 'types/cross-fetch'.
1 /// <reference types="types/cross-fetch" />
~~~~~~~~~~~~~~~~~
Found 1 error.
Is the triple-slash directive in index.d.ts
supposed to be:
/// <reference types="cross-fetch" />
?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:8 (2 by maintainers)
Top Results From Across the Web
TypeScript build-time error: `Cannot find type definition file for ...
When attempting to build a TypeScript project that has prismic-javascript@3.0.0 as a dependency, I get the following error: node_modules/prismic ...
Read more >Cannot find type definition file for 'node' in TypeScript
To solve the error "Cannot find type definition file for node", install the `node` types by running `npm i -D @types/node`. If the...
Read more >Build:Cannot find type definition file for 'node' - Stack Overflow
The template I started with used an older version of Angular, so I updated the package references. When I build, the first error...
Read more >TypeScript configuration - Angular
When the compiler doesn't recognize something, it reports an error. Use TypeScript type definition files — d.ts files — to tell the compiler...
Read more >What do "Cannot find type definition file for x" errors even mean?
Hello, I am writing cloud functions with node js and typescript, and usually everything works fine, however every once in a while I...
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
A cleaner solution may be to use https://github.com/ds300/patch-package to fix the type in your repo
Fixed in b998175b