Cannot find name 'LocalForage'.
See original GitHub issuePackage + Version
-
@sentry/integrations
5.22.0
Version:
5.22.0
Description
Getting Type errors when using @sentry/integrations in our app.
node_modules/@sentry/integrations/dist/offline.d.ts
27 | * event cache
28 | */
> 29 | offlineEventStore: LocalForage;
| ^
30 | /**
31 | * @inheritDoc
32 | */```
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Cannot find name 'LocalForage'. · Issue #74 - GitHub
Since updating the package getting this error Typescript Error Cannot find name 'LocalForage'.
Read more >how to get rid of typescript error message "Cannot find module ...
First - install type definitions from: localforage. Second - change your import to: import {localforage} from 'localforage';.
Read more >localforage - npm
localForage supports storing all native JS objects that can be serialized to JSON, as well as ArrayBuffers, Blobs, and TypedArrays. Check the ...
Read more >Cannot find type definition file for 'localforage' - Ionic Framework
First of all, I do not use typings in my project. At least not that I know of. I also do not use...
Read more >localForage - GitHub Pages
localForage is a JavaScript library that improves the offline experience of your web app by using an asynchronous ... Get the name of...
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
Same issue, problem is that Sentry is building with a
@ts-ignore
which gets removed entirely after building, including the import of LocalForagehttps://github.com/getsentry/sentry-javascript/blob/748494f1b9e0f5e963612e9152f43839a9a7c60c/packages/integrations/src/offline.ts#L3-L5
We have a similar issue, but it complains about
Window
interface being unknown in our Node.js project.We use
lib: ["es2019"]
(nolib: ["dom"]
) in our tsconfig.json (because it’s a Node project).