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.

Cannot find name 'LocalForage'.

See original GitHub issue

Package + 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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
favnacommented, Aug 27, 2020

Same issue, problem is that Sentry is building with a @ts-ignore which gets removed entirely after building, including the import of LocalForage

https://github.com/getsentry/sentry-javascript/blob/748494f1b9e0f5e963612e9152f43839a9a7c60c/packages/integrations/src/offline.ts#L3-L5

1reaction
kirillgroshkovcommented, Aug 28, 2020

We have a similar issue, but it complains about Window interface being unknown in our Node.js project.

We use lib: ["es2019"] (no lib: ["dom"]) in our tsconfig.json (because it’s a Node project).

Read more comments on GitHub >

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

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