Sentry-javascript: Cannot find name 'LocalForage'.

Created on 27 Aug 2020  路  5Comments  路  Source: getsentry/sentry-javascript

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
```9:24 Cannot find name 'LocalForage'.
27 | * event cache
28 | */

29 | offlineEventStore: LocalForage;
| ^
30 | /**
31 | * @inheritDoc
32 | */```

Confirmed In Progress

Most helpful comment

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

All 5 comments

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

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

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

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dwelle picture dwelle  路  3Comments

grigored picture grigored  路  3Comments

Taewa picture Taewa  路  3Comments

kamilogorek picture kamilogorek  路  3Comments

dimmduh picture dimmduh  路  3Comments