Skip to content

Cannot find name 'LocalForage'. #2853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task
tjsteinhaus opened this issue Aug 27, 2020 · 5 comments · Fixed by #2856, #2861 or #3508
Closed
1 task

Cannot find name 'LocalForage'. #2853

tjsteinhaus opened this issue Aug 27, 2020 · 5 comments · Fixed by #2856, #2861 or #3508

Comments

@tjsteinhaus
Copy link

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 |      */```
@favna
Copy link

favna commented 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

// @ts-ignore: Module '"localforage"' has no default export.
import localforage from 'localforage';

@AbhiPrasad
Copy link
Member

Thank you for reporting, sorry for the inconvenience here. We have opened #2856 as a fix.

@Ky6uk
Copy link

Ky6uk commented Aug 28, 2020

@AbhiPrasad it looks the problem still exists on v5.22.1

@AbhiPrasad
Copy link
Member

Sorry for the trouble, @Ky6uk we pushed another release for 5.22.2.

@kirillgroshkov
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment