Closed jasperkuperus closed 3 years ago
Could you try 0.5.3 of the pre-release packages please? I think these were fixed?
cc @IljaDaderko
Tried both 0.5.3
and 0.5.4
. Still got errors, somewhat different though:
node_modules/@react-native-firebase/app/lib/index.d.ts:395:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
395 export default module;
~~~~~~
node_modules/@react-native-firebase/auth/lib/index.d.ts:1589:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1589 import ReactNativeFirebaseModule = ReactNativeFirebase.Module;
~~~~~~
node_modules/@react-native-firebase/auth/lib/index.d.ts:1590:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1590 import FirebaseModuleWithStaticsAndApp = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp;
~~~~~~
node_modules/@react-native-firebase/auth/lib/index.d.ts:1593:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
1593 export const firebase = firebaseNamedExport;
~~~~~~~~~~~~~~~~~~~
node_modules/@react-native-firebase/auth/lib/index.d.ts:1596:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
1596 export default module;
~~~~~~
Found 5 errors.
(These are the errors for 0.5.4
)
@Salakar No, this is new to me as well. Will need to take another look. At first glance it looks like ts is highlighting "semantic" errors i.e. no imports in declarations etc...
Weird, not sure why it doesn't show up in any of our typescript tests or validations though 🤔
Just tried locally, all seems to be passing now with latest updates.
I get similar errors somehow on 6.0.3 but it's hard to say why (I checked on both 3.6.4 and 3.5.3 TS versions). I get this both on a local machine and on CI so it's not any kind of cache.
node_modules/@react-native-firebase/analytics/lib/index.d.ts:1350:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1350 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~
node_modules/@react-native-firebase/analytics/lib/index.d.ts:1351:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1351 import ReactNativeFirebaseModule = ReactNativeFirebase.Module;
~~~~~~
node_modules/@react-native-firebase/analytics/lib/index.d.ts:1352:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
1352 import FirebaseModuleWithStatics = ReactNativeFirebase.FirebaseModuleWithStatics;
~~~~~~
node_modules/@react-native-firebase/analytics/lib/index.d.ts:1355:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
1355 export const firebase = firebaseNamedExport;
~~~~~~~~~~~~~~~~~~~
node_modules/@react-native-firebase/analytics/lib/index.d.ts:1361:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
1361 export default defaultExport;
~~~~~~
node_modules/@react-native-firebase/analytics/lib/index.d.ts:1383:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
1383 namespace ReactNativeFirebase {
~~~~~~~~~
node_modules/@react-native-firebase/app/lib/index.d.ts:395:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
my tsConfig:
{
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"isolatedModules": true,
"noUnusedLocals": true,
"jsx": "react-native",
"lib": [
"esnext"
],
"moduleResolution": "node",
"noEmit": true,
"strict": true,
"target": "esnext",
"resolveJsonModule": true,
"types": [
"node",
"jest"
],
"downlevelIteration": true
},
"include": [
"packages/[redacted]/src/**/*",
"packages/[redacted]/__mocks__/**/*",
"packages/[redacted]/**/*"
],
"exclude": [
"node_modules",
"babel.config.js",
"metro.config.js",
"jest.config.js"
]
}
@IljaDaderko
Also tracking in https://github.com/invertase/react-native-firebase/issues/2732 - have confirmed it's an issue on all modules. Unfortunately the fix requires a substantial change to all the type definitions so tracking this for 6.1.0.
Frustratingly it didn't show up on any of our tests before we released v6 because of a single tsconfig.json
option 😫 but we can reproduce now
this happened to me after migrating from v5 - v6.
i just added this line to tsconfig.json to please my pipelines but i dont think that this is an actual fix
"skipLibCheck": true
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?
This issue will be closed in 15 days if no further activity occurs. Thank you for your contributions.
This is still a problem for me, even after upgrading to v6.2.0
of the following Firebase libs:
"@react-native-firebase/app": "6.2.0",
"@react-native-firebase/dynamic-links": "6.2.0",
This is the tsc
result:
node_modules/@react-native-firebase/app/lib/index.d.ts:395:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
395 export default module;
~~~~~~
node_modules/@react-native-firebase/dynamic-links/lib/index.d.ts:562:22 - error TS2315: Type 'Function' is not generic.
562 onLink(listener: Function<DynamicLink>): Function;
~~~~~~~~~~~~~~~~~~~~~
node_modules/@react-native-firebase/dynamic-links/lib/index.d.ts:568:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
568 import { ReactNativeFirebase } from '@react-native-firebase/app';
~~~~~~
node_modules/@react-native-firebase/dynamic-links/lib/index.d.ts:569:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
569 import ReactNativeFirebaseModule = ReactNativeFirebase.Module;
~~~~~~
node_modules/@react-native-firebase/dynamic-links/lib/index.d.ts:570:3 - error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
570 import FirebaseModuleWithStatics = ReactNativeFirebase.FirebaseModuleWithStatics;
~~~~~~
node_modules/@react-native-firebase/dynamic-links/lib/index.d.ts:573:27 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
573 export const firebase = firebaseNamedExport;
~~~~~~~~~~~~~~~~~~~
node_modules/@react-native-firebase/dynamic-links/lib/index.d.ts:579:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
579 export default defaultExport;
~~~~~~
node_modules/@types/react-native/index.d.ts:8916:9 - error TS2403: Subsequent variable declarations must have the same type. Variable 'require' must be of type 'Require', but here has type 'NodeRequire'.
8916 var require: NodeRequire;
Running TypeScript v3.7.4
. The "skipLibCheck": true
workaround "works" but I'd rather leave it disabled.
Yeah apologies, we still need to get around to fixing these. It was a derp on our end during development and we didn't have these issues flagging 😭
No need to apologize. I wasn’t trying to exert pressure or anything, just fending off the stale bot :D
If you need more details to investigate this let me know.
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?
This issue will be closed in 15 days if no further activity occurs. Thank you for your contributions.
@stale Don't close this just yet
having same issue with
"@react-native-firebase/analytics": "^6.2.0",
"@react-native-firebase/app": "^6.2.0",
"@react-native-firebase/perf": "^6.2.0",
"typescript": "^3.7.2"
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?
This issue will be closed in 15 days if no further activity occurs. Thank you for your contributions.
still valid. 6.3.0
Is there any workaround for now?
@almeynman yes, see @jerameel comment above.
add: "skipLibCheck": true
to tsconfig.json
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?
This issue will be closed in 15 days if no further activity occurs. Thank you for your contributions.
still valid
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?
This issue will be closed in 15 days if no further activity occurs. Thank you for your contributions.
I can confirm that this issue is still present.
GIven the frequent staleness, anyone have a PR? That would help move it along
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?
This issue will be closed in 15 days if no further activity occurs. Thank you for your contributions.
it's still valid
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?
This issue will be closed in 15 days if no further activity occurs. Thank you for your contributions.
Still issue to me for @react-native-firebase/dynamic-links
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?
This issue will be closed in 15 days if no further activity occurs. Thank you for your contributions.
Still issue to me for @react-native-firebase/dynamic-links
This clearly needs some community help as it's sat stale for a while. We would welcome any PRs that addressed the errors/warnings seen
Yes please 🙏 PRs would be welcome
We happily accept types PRs #3810 is an example If someone generates one, there will even be an "artifact" on the top-right-ish of the Action "Create Test Patches" which others can try, to validate. We will need to the community to drive this, all the available Invertase resources are booked for quite a while as there is paying work (true! it exists) and then after that there is a big backlog of changed / new functionality in the upstream APIs to cover, a mch higher priority than types
Why does this issue have [v6]
in the name? It's still a problem on the latest versions of @react-native-firebase/*
packages.
Specifically, as of this comment, these packages/versions:
"@react-native-firebase/analytics": "7.6.1"
"@react-native-firebase/app": "8.4.1"
"@react-native-firebase/crashlytics": "^8.4.2"
Because it was originally logged when v5 and v6 were co-existing. It's a historical context, nothing semantically useful anymore
The entire list of type declaration conflicts can be seen by making these changes to the monrepo's tsconfig.json
:
- "skipLibCheck": true,
+ "skipLibCheck": false,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
- "lib": ["es2015", "es2016", "esnext", "dom"]
+ "lib": ["es2015", "es2016", "esnext"]
Removing dom
just hides type conflicts between typescript/lib/lib.dom.d.ts
and @types/react-native
; those conflicts are unrelated to this issue.
So it seems any PR to fix this should include that change to the tsconfig.json - do you have anything in mind for a PR?
I don't think I'll be able to fix this, at least not yet, as I'm still new to TypeScript, & these type declaration files are some of the most complex I've seen so far. Definitely don't want to make it worse!
Pinging this thread since there are many subscribers:
If you want to try skipLibCheck: false
-compatible types, check out these patch-package
files. Install a patchfile for each RNFB library you use: https://gist.github.com/davidgovea/2feea6af41b41f76fae1a9c14465cb69
It's working for me! But I only use app
& analytics
in production. Would appreciate any feedback.
Tracking the work in PR #4306
@davidgovea did you know I added auto-patch-package generation here :-) - check it out: https://github.com/invertase/react-native-firebase/actions/runs/271992461 (it's off the "Checks" area on the PR then the "Create Test Patches" action
Thank you for the PR in general though! I would love to hear positive feedback and I'm excited to merge them. I use most of the modules myself and I'll give them a try in my work project to see how it goes also
Getting this while running
npm run build
`
../node_modules/@types/react-native/globals.d.ts:168:13 - error TS2403: Subsequent variable declarations must have the same type. Variable 'Response' must be of type '{ new (body?: BodyInit | null | undefined, init?: ResponseInit | undefined): Response; prototype: Response; error(): Response; redirect(url: string | URL, status?: number | undefined): Response; }', but here has type '{ new (body?: BodyInit_ | undefined, init?: ResponseInit | undefined): Response; prototype: Response; error: () => Response; redirect: (url: string, status?: number | undefined) => Response; }'.
168 declare var Response: {
~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:11275:13
11275 declare var Response: {
~~~~~~~~
'Response' was also declared here.
../node_modules/@types/react-native/globals.d.ts:245:5 - error TS2717: Subsequent property declarations must have the same type. Property 'abort' must be of type 'ProgressEvent<XMLHttpRequestEventTarget>', but here has type 'ProgressEvent<EventTarget>'.
245 abort: ProgressEvent;
~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16664:5
16664 "abort": ProgressEvent<XMLHttpRequestEventTarget>;
~~~~~~~
'abort' was also declared here.
../node_modules/@types/react-native/globals.d.ts:246:5 - error TS2717: Subsequent property declarations must have the same type. Property 'error' must be of type 'ProgressEvent<XMLHttpRequestEventTarget>', but here has type 'ProgressEvent<EventTarget>'.
246 error: ProgressEvent;
~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16665:5
16665 "error": ProgressEvent<XMLHttpRequestEventTarget>;
~~~~~~~
'error' was also declared here.
../node_modules/@types/react-native/globals.d.ts:247:5 - error TS2717: Subsequent property declarations must have the same type. Property 'load' must be of type 'ProgressEvent<XMLHttpRequestEventTarget>', but here has type 'ProgressEvent<EventTarget>'.
247 load: ProgressEvent;
~~~~
node_modules/typescript/lib/lib.dom.d.ts:16666:5
16666 "load": ProgressEvent<XMLHttpRequestEventTarget>;
~~~~~~
'load' was also declared here.
../node_modules/@types/react-native/globals.d.ts:248:5 - error TS2717: Subsequent property declarations must have the same type. Property 'loadend' must be of type 'ProgressEvent<XMLHttpRequestEventTarget>', but here has type 'ProgressEvent<EventTarget>'.
248 loadend: ProgressEvent;
~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16667:5
16667 "loadend": ProgressEvent<XMLHttpRequestEventTarget>;
~~~~~~~~~
'loadend' was also declared here.
../node_modules/@types/react-native/globals.d.ts:249:5 - error TS2717: Subsequent property declarations must have the same type. Property 'loadstart' must be of type 'ProgressEvent<XMLHttpRequestEventTarget>', but here has type 'ProgressEvent<EventTarget>'.
249 loadstart: ProgressEvent;
~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16668:5
16668 "loadstart": ProgressEvent<XMLHttpRequestEventTarget>;
~~~~~~~~~~~
'loadstart' was also declared here.
../node_modules/@types/react-native/globals.d.ts:250:5 - error TS2717: Subsequent property declarations must have the same type. Property 'progress' must be of type 'ProgressEvent<XMLHttpRequestEventTarget>', but here has type 'ProgressEvent<EventTarget>'.
250 progress: ProgressEvent;
~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16669:5
16669 "progress": ProgressEvent<XMLHttpRequestEventTarget>;
~~~~~~~~~~
'progress' was also declared here.
../node_modules/@types/react-native/globals.d.ts:251:5 - error TS2717: Subsequent property declarations must have the same type. Property 'timeout' must be of type 'ProgressEvent<XMLHttpRequestEventTarget>', but here has type 'ProgressEvent<EventTarget>'.
251 timeout: ProgressEvent;
~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16670:5
16670 "timeout": ProgressEvent<XMLHttpRequestEventTarget>;
~~~~~~~~~
'timeout' was also declared here.
../node_modules/@types/react-native/globals.d.ts:292:14 - error TS2300: Duplicate identifier 'XMLHttpRequestResponseType'.
292 declare type XMLHttpRequestResponseType = '' | 'arraybuffer' | 'blob' | 'document' | 'json' | 'text';
~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:17949:6
17949 type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";
~~~~~~~~~~~~~~~~~~~~~~~~~~
'XMLHttpRequestResponseType' was also declared here.
../node_modules/@types/react-native/globals.d.ts:299:15 - error TS2300: Duplicate identifier 'URL'.
299 declare class URL {
~~~
node_modules/typescript/lib/lib.dom.d.ts:13988:11
13988 interface URL {
~~~
'URL' was also declared here.
node_modules/typescript/lib/lib.dom.d.ts:14005:13
14005 declare var URL: {
~~~
and here.
../node_modules/@types/react-native/globals.d.ts:324:15 - error TS2300: Duplicate identifier 'URLSearchParams'.
324 declare class URLSearchParams {
~~~~~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:14015:11
14015 interface URLSearchParams {
~~~~~~~~~~~~~~~
'URLSearchParams' was also declared here.
node_modules/typescript/lib/lib.dom.d.ts:14034:13
14034 declare var URLSearchParams: {
~~~~~~~~~~~~~~~
and here.
node_modules/typescript/lib/lib.dom.iterable.d.ts:256:11
256 interface URLSearchParams {
~~~~~~~~~~~~~~~
and here.
../node_modules/@types/react-native/globals.d.ts:368:5 - error TS2717: Subsequent property declarations must have the same type. Property 'onopen' must be of type '((this: WebSocket, ev: Event) => any) | null', but here has type '(() => void) | null'.
368 onopen: (() => void) | null;
~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16201:5
16201 onopen: ((this: WebSocket, ev: Event) => any) | null;
~~~~~~
'onopen' was also declared here.
../node_modules/@types/react-native/globals.d.ts:369:5 - error TS2717: Subsequent property declarations must have the same type. Property 'onmessage' must be of type '((this: WebSocket, ev: MessageEvent<any>) => any) | null', but here has type '((event: WebSocketMessageEvent) => void) | null'.
369 onmessage: ((event: WebSocketMessageEvent) => void) | null;
~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16200:5
16200 onmessage: ((this: WebSocket, ev: MessageEvent) => any) | null;
~~~~~~~~~
'onmessage' was also declared here.
../node_modules/@types/react-native/globals.d.ts:370:5 - error TS2717: Subsequent property declarations must have the same type. Property 'onerror' must be of type '((this: WebSocket, ev: Event) => any) | null', but here has type '((event: WebSocketErrorEvent) => void) | null'.
370 onerror: ((event: WebSocketErrorEvent) => void) | null;
~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16199:5
16199 onerror: ((this: WebSocket, ev: Event) => any) | null;
~~~~~~~
'onerror' was also declared here.
../node_modules/@types/react-native/globals.d.ts:371:5 - error TS2717: Subsequent property declarations must have the same type. Property 'onclose' must be of type '((this: WebSocket, ev: CloseEvent) => any) | null', but here has type '((event: WebSocketCloseEvent) => void) | null'.
371 onclose: ((event: WebSocketCloseEvent) => void) | null;
~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16198:5
16198 onclose: ((this: WebSocket, ev: CloseEvent) => any) | null;
~~~~~~~
'onclose' was also declared here.
../node_modules/@types/react-native/globals.d.ts:372:5 - error TS2717: Subsequent property declarations must have the same type. Property 'addEventListener' must be of type '{ <K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void; (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | ... 1 more ... | undefined): void; }', but here has type 'WebsocketEventListener'.
372 addEventListener: WebsocketEventListener;
~~~~~~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16216:5
16216 addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'addEventListener' was also declared here.
../node_modules/@types/react-native/globals.d.ts:373:5 - error TS2717: Subsequent property declarations must have the same type. Property 'removeEventListener' must be of type '{ <K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | EventListenerOptions | undefined): void; (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | ... 1 more ... | undefined): void; }', but here has type 'WebsocketEventListener'.
373 removeEventListener: WebsocketEventListener;
~~~~~~~~~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16218:5
16218 removeEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'removeEventListener' was also declared here.
../node_modules/@types/react-native/globals.d.ts:376:13 - error TS2403: Subsequent variable declarations must have the same type. Variable 'WebSocket' must be of type '{ new (url: string | URL, protocols?: string | string[] | undefined): WebSocket; prototype: WebSocket; readonly CLOSED: number; readonly CLOSING: number; readonly CONNECTING: number; readonly OPEN: number; }', but here has type '{ new (uri: string, protocols?: string | string[] | null | undefined, options?: { [optionName: string]: any; headers: { [headerName: string]: string; }; } | null | undefined): WebSocket; ... 4 more ...; readonly OPEN: number; }'.
376 declare var WebSocket: {
~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16222:13
16222 declare var WebSocket: {
~~~~~~~~~
'WebSocket' was also declared here.
../node_modules/@types/react-native/globals.d.ts:400:15 - error TS2300: Duplicate identifier 'AbortSignal'.
400 declare class AbortSignal implements EventTarget {
~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:1913:11
1913 interface AbortSignal extends EventTarget {
~~~~~~~~~~~
'AbortSignal' was also declared here.
node_modules/typescript/lib/lib.dom.d.ts:1923:13
1923 declare var AbortSignal: {
~~~~~~~~~~~
and here.
node_modules/@types/node/globals.d.ts:60:11
60 interface AbortSignal {
~~~~~~~~~~~
and here.
node_modules/@types/node/globals.d.ts:72:13
72 declare var AbortSignal: {
~~~~~~~~~~~
and here.
../node_modules/@types/react-native/globals.d.ts:400:15 - error TS2420: Class 'AbortSignal' incorrectly implements interface 'EventTarget'.
Property 'dispatchEvent' is missing in type 'AbortSignal' but required in type 'EventTarget'.
400 declare class AbortSignal implements EventTarget {
~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:5033:5
5033 dispatchEvent(event: Event): boolean;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'dispatchEvent' is declared here.
../node_modules/@types/react-native/globals.d.ts:435:15 - error TS2300: Duplicate identifier 'AbortController'.
435 declare class AbortController {
~~~~~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:1896:11
1896 interface AbortController {
~~~~~~~~~~~~~~~
'AbortController' was also declared here.
node_modules/typescript/lib/lib.dom.d.ts:1903:13
1903 declare var AbortController: {
~~~~~~~~~~~~~~~
and here.
node_modules/@types/node/globals.d.ts:47:11
47 interface AbortController {
~~~~~~~~~~~~~~~
and here.
node_modules/@types/node/globals.d.ts:67:13
67 declare var AbortController: {
~~~~~~~~~~~~~~~
and here.
../node_modules/@types/react-native/globals.d.ts:460:14 - error TS2717: Subsequent property declarations must have the same type. Property 'error' must be of type 'DOMException | null', but here has type 'Error | null'.
460 readonly error: Error | null;
~~~~~
node_modules/typescript/lib/lib.dom.d.ts:5092:14
5092 readonly error: DOMException | null;
~~~~~
'error' was also declared here.
../node_modules/@types/react-native/globals.d.ts:468:14 - error TS2717: Subsequent property declarations must have the same type. Property 'result' must be of type 'string | ArrayBuffer | null', but here has type 'string | ArrayBuffer'.
468 readonly result: string | ArrayBuffer;
~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:5100:14
5100 readonly result: string | ArrayBuffer | null;
~~~~~~
'result' was also declared here.
../node_modules/@types/react-native/index.d.ts:9742:11 - error TS2451: Cannot redeclare block-scoped variable 'originalXMLHttpRequest'.
9742 const originalXMLHttpRequest: any;
~~~~~~~~~~~~~~~~~~~~~~
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/index.d.ts:9807:11
9807 const originalXMLHttpRequest: any;
~~~~~~~~~~~~~~~~~~~~~~
'originalXMLHttpRequest' was also declared here.
../node_modules/@types/react-native/index.d.ts:9744:11 - error TS2451: Cannot redeclare block-scoped variable '__BUNDLE_START_TIME__'.
9744 const __BUNDLE_START_TIME__: number;
~~~~~~~~~~~~~~~~~~~~~
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/index.d.ts:9809:11
9809 const __BUNDLE_START_TIME__: number;
~~~~~~~~~~~~~~~~~~~~~
'__BUNDLE_START_TIME__' was also declared here.
../node_modules/@types/react-native/index.d.ts:9745:11 - error TS2451: Cannot redeclare block-scoped variable 'ErrorUtils'.
9745 const ErrorUtils: ErrorUtils;
~~~~~~~~~~
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/index.d.ts:9810:11
9810 const ErrorUtils: ErrorUtils;
~~~~~~~~~~
'ErrorUtils' was also declared here.
../node_modules/@types/react-native/index.d.ts:9752:11 - error TS2451: Cannot redeclare block-scoped variable '__DEV__'.
9752 const __DEV__: boolean;
~~~~~~~
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/index.d.ts:9817:11
9817 const __DEV__: boolean;
~~~~~~~
'__DEV__' was also declared here.
../node_modules/@types/react-native/index.d.ts:9754:11 - error TS2451: Cannot redeclare block-scoped variable 'HermesInternal'.
9754 const HermesInternal: null | {};
~~~~~~~~~~~~~~
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/index.d.ts:9819:11
9819 const HermesInternal: null | {};
~~~~~~~~~~~~~~
'HermesInternal' was also declared here.
../node_modules/@types/react-native/LaunchScreen.d.ts:4:18 - error TS2451: Cannot redeclare block-scoped variable 'Header'.
4 export const Header: any;
~~~~~~
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/LaunchScreen.d.ts:4:18
4 export const Header: any;
~~~~~~
'Header' was also declared here.
../node_modules/@types/react-native/LaunchScreen.d.ts:5:18 - error TS2451: Cannot redeclare block-scoped variable 'LearnMoreLinks'.
5 export const LearnMoreLinks: any;
~~~~~~~~~~~~~~
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/LaunchScreen.d.ts:5:18
5 export const LearnMoreLinks: any;
~~~~~~~~~~~~~~
'LearnMoreLinks' was also declared here.
../node_modules/@types/react-native/LaunchScreen.d.ts:6:18 - error TS2451: Cannot redeclare block-scoped variable 'Colors'.
6 export const Colors: any;
~~~~~~
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/LaunchScreen.d.ts:6:18
6 export const Colors: any;
~~~~~~
'Colors' was also declared here.
../node_modules/@types/react-native/LaunchScreen.d.ts:7:18 - error TS2451: Cannot redeclare block-scoped variable 'DebugInstructions'.
7 export const DebugInstructions: any;
~~~~~~~~~~~~~~~~~
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/LaunchScreen.d.ts:7:18
7 export const DebugInstructions: any;
~~~~~~~~~~~~~~~~~
'DebugInstructions' was also declared here.
../node_modules/@types/react-native/LaunchScreen.d.ts:8:18 - error TS2451: Cannot redeclare block-scoped variable 'ReloadInstructions'.
8 export const ReloadInstructions: any;
~~~~~~~~~~~~~~~~~~
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/LaunchScreen.d.ts:8:18
8 export const ReloadInstructions: any;
~~~~~~~~~~~~~~~~~~
'ReloadInstructions' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/BatchedBridge.d.ts:8:15 - error TS2300: Duplicate identifier 'MessageQueue'.
8 declare class MessageQueue {
~~~~~~~~~~~~
../node_modules/@types/react-native/BatchedBridge.d.ts:8:15
8 declare class MessageQueue {
~~~~~~~~~~~~
'MessageQueue' was also declared here.
../node_modules/@types/react-native/BatchedBridge.d.ts:22:20
22 export default MessageQueue;
~~~~~~~~~~~~
and here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/BatchedBridge.d.ts:18:20 - error TS2300: Duplicate identifier 'BatchedBridge'.
18 export default BatchedBridge;
~~~~~~~~~~~~~
../node_modules/@types/react-native/BatchedBridge.d.ts:18:20
18 export default BatchedBridge;
~~~~~~~~~~~~~
'BatchedBridge' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/BatchedBridge.d.ts:22:20 - error TS2300: Duplicate identifier 'MessageQueue'.
22 export default MessageQueue;
~~~~~~~~~~~~
../node_modules/@types/react-native/BatchedBridge.d.ts:8:15
8 declare class MessageQueue {
~~~~~~~~~~~~
'MessageQueue' was also declared here.
../node_modules/@types/react-native/BatchedBridge.d.ts:22:20
22 export default MessageQueue;
~~~~~~~~~~~~
and here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/Devtools.d.ts:2:17 - error TS2300: Duplicate identifier 'StackFrame'.
2 export type StackFrame = {
~~~~~~~~~~
../node_modules/@types/react-native/Devtools.d.ts:2:17
2 export type StackFrame = {
~~~~~~~~~~
'StackFrame' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:10:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: FormDataPart, BodyInit_, HeadersInit_, RequestCredentials_, RequestMode_, ResponseType_, WebsocketMessageEventListener, WebsocketErrorEventListener, WebsocketOpenEventListener, WebsocketCloseEventListener, WebsocketEventListener
10 declare function clearInterval(handle: number): void;
~~~~~~~
../node_modules/@types/react-native/globals.d.ts:10:1
10 declare function clearInterval(handle: number): void;
~~~~~~~
Conflicts are in this file.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:50:13 - error TS2403: Subsequent variable declarations must have the same type. Variable 'Blob' must be of type '{ new (blobParts?: BlobPart[] | undefined, options?: BlobPropertyBag | undefined): Blob; prototype: Blob; }', but here has type '{ new (blobParts?: (string | Blob)[] | undefined, options?: BlobOptions | undefined): Blob; prototype: Blob; }'.
50 declare var Blob: {
~~~~
node_modules/typescript/lib/lib.dom.d.ts:2416:13
2416 declare var Blob: {
~~~~
'Blob' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:65:15 - error TS2300: Duplicate identifier 'FormData'.
65 declare class FormData {
~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:5286:11
5286 interface FormData {
~~~~~~~~
'FormData' was also declared here.
node_modules/typescript/lib/lib.dom.d.ts:5296:13
5296 declare var FormData: {
~~~~~~~~
and here.
node_modules/typescript/lib/lib.dom.iterable.d.ts:79:11
79 interface FormData {
~~~~~~~~
and here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:100:5 - error TS2374: Duplicate index signature for type 'string'.
100 [key: string]: any;
~~~~~~~~~~~~~~~~~~~
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:122:5 - error TS2717: Subsequent property declarations must have the same type. Property 'body' must be of type 'BodyInit | null | undefined', but here has type 'BodyInit_ | undefined'.
122 body?: BodyInit_ | undefined;
~~~~
node_modules/typescript/lib/lib.dom.d.ts:1498:5
1498 body?: BodyInit | null;
~~~~
'body' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:130:5 - error TS2717: Subsequent property declarations must have the same type. Property 'window' must be of type 'null | undefined', but here has type 'any'.
130 window?: any;
~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:1522:5
1522 window?: null;
~~~~~~
'window' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:131:5 - error TS2717: Subsequent property declarations must have the same type. Property 'signal' must be of type 'AbortSignal | null | undefined', but here has type 'AbortSignal | undefined'.
131 signal?: AbortSignal | undefined;
~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:1520:5
1520 signal?: AbortSignal | null;
~~~~~~
'signal' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:149:14 - error TS2300: Duplicate identifier 'RequestInfo'.
149 declare type RequestInfo = Request | string;
~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:17794:6
17794 type RequestInfo = Request | string;
~~~~~~~~~~~
'RequestInfo' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:168:13 - error TS2403: Subsequent variable declarations must have the same type. Variable 'Response' must be of type '{ new (body?: BodyInit | null | undefined, init?: ResponseInit | undefined): Response; prototype: Response; error(): Response; redirect(url: string | URL, status?: number | undefined): Response; }', but here has type '{ new (body?: BodyInit_ | undefined, init?: ResponseInit | undefined): Response; prototype: Response; error: () => Response; redirect: (url: string, status?: number | undefined) => Response; }'.
168 declare var Response: {
~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:11275:13
11275 declare var Response: {
~~~~~~~~
'Response' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:245:5 - error TS2717: Subsequent property declarations must have the same type. Property 'abort' must be of type 'ProgressEvent<XMLHttpRequestEventTarget>', but here has type 'ProgressEvent<EventTarget>'.
245 abort: ProgressEvent;
~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16664:5
16664 "abort": ProgressEvent<XMLHttpRequestEventTarget>;
~~~~~~~
'abort' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:246:5 - error TS2717: Subsequent property declarations must have the same type. Property 'error' must be of type 'ProgressEvent<XMLHttpRequestEventTarget>', but here has type 'ProgressEvent<EventTarget>'.
246 error: ProgressEvent;
~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16665:5
16665 "error": ProgressEvent<XMLHttpRequestEventTarget>;
~~~~~~~
'error' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:247:5 - error TS2717: Subsequent property declarations must have the same type. Property 'load' must be of type 'ProgressEvent<XMLHttpRequestEventTarget>', but here has type 'ProgressEvent<EventTarget>'.
247 load: ProgressEvent;
~~~~
node_modules/typescript/lib/lib.dom.d.ts:16666:5
16666 "load": ProgressEvent<XMLHttpRequestEventTarget>;
~~~~~~
'load' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:248:5 - error TS2717: Subsequent property declarations must have the same type. Property 'loadend' must be of type 'ProgressEvent<XMLHttpRequestEventTarget>', but here has type 'ProgressEvent<EventTarget>'.
248 loadend: ProgressEvent;
~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16667:5
16667 "loadend": ProgressEvent<XMLHttpRequestEventTarget>;
~~~~~~~~~
'loadend' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:249:5 - error TS2717: Subsequent property declarations must have the same type. Property 'loadstart' must be of type 'ProgressEvent<XMLHttpRequestEventTarget>', but here has type 'ProgressEvent<EventTarget>'.
249 loadstart: ProgressEvent;
~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16668:5
16668 "loadstart": ProgressEvent<XMLHttpRequestEventTarget>;
~~~~~~~~~~~
'loadstart' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:250:5 - error TS2717: Subsequent property declarations must have the same type. Property 'progress' must be of type 'ProgressEvent<XMLHttpRequestEventTarget>', but here has type 'ProgressEvent<EventTarget>'.
250 progress: ProgressEvent;
~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16669:5
16669 "progress": ProgressEvent<XMLHttpRequestEventTarget>;
~~~~~~~~~~
'progress' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:251:5 - error TS2717: Subsequent property declarations must have the same type. Property 'timeout' must be of type 'ProgressEvent<XMLHttpRequestEventTarget>', but here has type 'ProgressEvent<EventTarget>'.
251 timeout: ProgressEvent;
~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16670:5
16670 "timeout": ProgressEvent<XMLHttpRequestEventTarget>;
~~~~~~~~~
'timeout' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:292:14 - error TS2300: Duplicate identifier 'XMLHttpRequestResponseType'.
292 declare type XMLHttpRequestResponseType = '' | 'arraybuffer' | 'blob' | 'document' | 'json' | 'text';
~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:17949:6
17949 type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";
~~~~~~~~~~~~~~~~~~~~~~~~~~
'XMLHttpRequestResponseType' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:299:15 - error TS2300: Duplicate identifier 'URL'.
299 declare class URL {
~~~
node_modules/typescript/lib/lib.dom.d.ts:13988:11
13988 interface URL {
~~~
'URL' was also declared here.
node_modules/typescript/lib/lib.dom.d.ts:14005:13
14005 declare var URL: {
~~~
and here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:324:15 - error TS2300: Duplicate identifier 'URLSearchParams'.
324 declare class URLSearchParams {
~~~~~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:14015:11
14015 interface URLSearchParams {
~~~~~~~~~~~~~~~
'URLSearchParams' was also declared here.
node_modules/typescript/lib/lib.dom.d.ts:14034:13
14034 declare var URLSearchParams: {
~~~~~~~~~~~~~~~
and here.
node_modules/typescript/lib/lib.dom.iterable.d.ts:256:11
256 interface URLSearchParams {
~~~~~~~~~~~~~~~
and here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:368:5 - error TS2717: Subsequent property declarations must have the same type. Property 'onopen' must be of type '((this: WebSocket, ev: Event) => any) | null', but here has type '(() => void) | null'.
368 onopen: (() => void) | null;
~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16201:5
16201 onopen: ((this: WebSocket, ev: Event) => any) | null;
~~~~~~
'onopen' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:369:5 - error TS2717: Subsequent property declarations must have the same type. Property 'onmessage' must be of type '((this: WebSocket, ev: MessageEvent<any>) => any) | null', but here has type '((event: WebSocketMessageEvent) => void) | null'.
369 onmessage: ((event: WebSocketMessageEvent) => void) | null;
~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16200:5
16200 onmessage: ((this: WebSocket, ev: MessageEvent) => any) | null;
~~~~~~~~~
'onmessage' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:370:5 - error TS2717: Subsequent property declarations must have the same type. Property 'onerror' must be of type '((this: WebSocket, ev: Event) => any) | null', but here has type '((event: WebSocketErrorEvent) => void) | null'.
370 onerror: ((event: WebSocketErrorEvent) => void) | null;
~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16199:5
16199 onerror: ((this: WebSocket, ev: Event) => any) | null;
~~~~~~~
'onerror' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:371:5 - error TS2717: Subsequent property declarations must have the same type. Property 'onclose' must be of type '((this: WebSocket, ev: CloseEvent) => any) | null', but here has type '((event: WebSocketCloseEvent) => void) | null'.
371 onclose: ((event: WebSocketCloseEvent) => void) | null;
~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16198:5
16198 onclose: ((this: WebSocket, ev: CloseEvent) => any) | null;
~~~~~~~
'onclose' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:372:5 - error TS2717: Subsequent property declarations must have the same type. Property 'addEventListener' must be of type '{ <K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void; (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | ... 1 more ... | undefined): void; }', but here has type 'WebsocketEventListener'.
372 addEventListener: WebsocketEventListener;
~~~~~~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16216:5
16216 addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'addEventListener' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:373:5 - error TS2717: Subsequent property declarations must have the same type. Property 'removeEventListener' must be of type '{ <K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | EventListenerOptions | undefined): void; (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | ... 1 more ... | undefined): void; }', but here has type 'WebsocketEventListener'.
373 removeEventListener: WebsocketEventListener;
~~~~~~~~~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16218:5
16218 removeEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'removeEventListener' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:376:13 - error TS2403: Subsequent variable declarations must have the same type. Variable 'WebSocket' must be of type '{ new (url: string | URL, protocols?: string | string[] | undefined): WebSocket; prototype: WebSocket; readonly CLOSED: number; readonly CLOSING: number; readonly CONNECTING: number; readonly OPEN: number; }', but here has type '{ new (uri: string, protocols?: string | string[] | null | undefined, options?: { [optionName: string]: any; headers: { [headerName: string]: string; }; } | null | undefined): WebSocket; ... 4 more ...; readonly OPEN: number; }'.
376 declare var WebSocket: {
~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:16222:13
16222 declare var WebSocket: {
~~~~~~~~~
'WebSocket' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:400:15 - error TS2300: Duplicate identifier 'AbortSignal'.
400 declare class AbortSignal implements EventTarget {
~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:1913:11
1913 interface AbortSignal extends EventTarget {
~~~~~~~~~~~
'AbortSignal' was also declared here.
node_modules/typescript/lib/lib.dom.d.ts:1923:13
1923 declare var AbortSignal: {
~~~~~~~~~~~
and here.
node_modules/@types/node/globals.d.ts:60:11
60 interface AbortSignal {
~~~~~~~~~~~
and here.
node_modules/@types/node/globals.d.ts:72:13
72 declare var AbortSignal: {
~~~~~~~~~~~
and here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:400:15 - error TS2420: Class 'AbortSignal' incorrectly implements interface 'EventTarget'.
Property 'dispatchEvent' is missing in type 'AbortSignal' but required in type 'EventTarget'.
400 declare class AbortSignal implements EventTarget {
~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:5033:5
5033 dispatchEvent(event: Event): boolean;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'dispatchEvent' is declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:435:15 - error TS2300: Duplicate identifier 'AbortController'.
435 declare class AbortController {
~~~~~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:1896:11
1896 interface AbortController {
~~~~~~~~~~~~~~~
'AbortController' was also declared here.
node_modules/typescript/lib/lib.dom.d.ts:1903:13
1903 declare var AbortController: {
~~~~~~~~~~~~~~~
and here.
node_modules/@types/node/globals.d.ts:47:11
47 interface AbortController {
~~~~~~~~~~~~~~~
and here.
node_modules/@types/node/globals.d.ts:67:13
67 declare var AbortController: {
~~~~~~~~~~~~~~~
and here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:460:14 - error TS2717: Subsequent property declarations must have the same type. Property 'error' must be of type 'DOMException | null', but here has type 'Error | null'.
460 readonly error: Error | null;
~~~~~
node_modules/typescript/lib/lib.dom.d.ts:5092:14
5092 readonly error: DOMException | null;
~~~~~
'error' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/globals.d.ts:468:14 - error TS2717: Subsequent property declarations must have the same type. Property 'result' must be of type 'string | ArrayBuffer | null', but here has type 'string | ArrayBuffer'.
468 readonly result: string | ArrayBuffer;
~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:5100:14
5100 readonly result: string | ArrayBuffer | null;
~~~~~~
'result' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/index.d.ts:9807:11 - error TS2451: Cannot redeclare block-scoped variable 'originalXMLHttpRequest'.
9807 const originalXMLHttpRequest: any;
~~~~~~~~~~~~~~~~~~~~~~
../node_modules/@types/react-native/index.d.ts:9742:11
9742 const originalXMLHttpRequest: any;
~~~~~~~~~~~~~~~~~~~~~~
'originalXMLHttpRequest' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/index.d.ts:9809:11 - error TS2451: Cannot redeclare block-scoped variable '__BUNDLE_START_TIME__'.
9809 const __BUNDLE_START_TIME__: number;
~~~~~~~~~~~~~~~~~~~~~
../node_modules/@types/react-native/index.d.ts:9744:11
9744 const __BUNDLE_START_TIME__: number;
~~~~~~~~~~~~~~~~~~~~~
'__BUNDLE_START_TIME__' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/index.d.ts:9810:11 - error TS2451: Cannot redeclare block-scoped variable 'ErrorUtils'.
9810 const ErrorUtils: ErrorUtils;
~~~~~~~~~~
../node_modules/@types/react-native/index.d.ts:9745:11
9745 const ErrorUtils: ErrorUtils;
~~~~~~~~~~
'ErrorUtils' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/index.d.ts:9817:11 - error TS2451: Cannot redeclare block-scoped variable '__DEV__'.
9817 const __DEV__: boolean;
~~~~~~~
../node_modules/@types/react-native/index.d.ts:9752:11
9752 const __DEV__: boolean;
~~~~~~~
'__DEV__' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/index.d.ts:9819:11 - error TS2451: Cannot redeclare block-scoped variable 'HermesInternal'.
9819 const HermesInternal: null | {};
~~~~~~~~~~~~~~
../node_modules/@types/react-native/index.d.ts:9754:11
9754 const HermesInternal: null | {};
~~~~~~~~~~~~~~
'HermesInternal' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/LaunchScreen.d.ts:4:18 - error TS2451: Cannot redeclare block-scoped variable 'Header'.
4 export const Header: any;
~~~~~~
../node_modules/@types/react-native/LaunchScreen.d.ts:4:18
4 export const Header: any;
~~~~~~
'Header' was also declared here.
../node_modules/@types/styled-components-react-native/node_modules/@types/react-native/LaunchScreen.d.ts:5:18 - error TS2451: Cannot redeclare block-scoped variable 'LearnMoreLinks'.
5 export const LearnMoreLinks: any;
~~~~~~~~~~~~~~
../node_modules/@types/react-native/LaunchScreen.d.ts:5:18
5 export const LearnMoreLinks: any;
~~~~~~~~~~~~~~
'LearnMoreLinks' was also declared here.
8 export const ReloadInstructions: any; ~~~~~~~~~~~~~~~~~~
../node_modules/@types/react-native/LaunchScreen.d.ts:8:18
8 export const ReloadInstructions: any;
~~~~~~~~~~~~~~~~~~
'ReloadInstructions' was also declared here.
`
on a react-native project that uses firebase functions
this happened to me after migrating from v5 - v6.
i just added this line to tsconfig.json to please my pipelines but i dont think that this is an actual fix
"skipLibCheck": true
Worked like a charm. Thanks!
Issue
I'm testing the Authentication part of v6. Functionally it works well, but I do get TypeScript errors when I run
yarn tsc
:For now, I'm hiding lib errors using
yarn tsc --skipLibCheck
, but I'd rather not use the--skipLibCheck
of course.Project Files
iOS
Click To Expand
#### `ios/Podfile`: - [ ] I'm not using Pods - [x] I'm using Pods and my Podfile looks like: ```ruby platform :ios, '9.0' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' target 'promo' do # Pods for promo pod 'React', :path => '../node_modules/react-native/' pod 'React-Core', :path => '../node_modules/react-native/React' pod 'React-DevSupport', :path => '../node_modules/react-native/React' pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS' pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation' pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob' pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image' pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS' pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network' pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings' pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text' pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration' pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket' pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact' pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi' pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor' pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector' pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga' pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec' target 'promoTests' do inherit! :search_paths # Pods for testing end use_native_modules! end target 'promo-tvOS' do # Pods for promo-tvOS target 'promo-tvOSTests' do inherit! :search_paths # Pods for testing end end ``` #### `AppDelegate.m`: ```objc /** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ @import Firebase; #import "AppDelegate.h" #import
#import
#import
#import "RNSplashScreen.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[FIRApp configure];
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"promo"
initialProperties:nil];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
// Show splash screen, make sure that JavaScript fully loads
[RNSplashScreen show];
return YES;
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}
@end
```
Android
Click To Expand
#### Have you converted to AndroidX? - [ ] my application is an AndroidX application? - [ ] I am using `android/gradle.settings` `jetifier=true` for Android compatibility? - [ ] I am using the NPM package `jetifier` for react-native compatibility? #### `android/build.gradle`: ```groovy // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext { buildToolsVersion = "28.0.3" minSdkVersion = 16 compileSdkVersion = 28 targetSdkVersion = 28 supportLibVersion = "28.0.0" } repositories { google() jcenter() } dependencies { classpath("com.android.tools.build:gradle:3.4.1") classpath 'com.google.gms:google-services:4.2.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { mavenLocal() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url("$rootDir/../node_modules/react-native/android") } maven { // Android JSC is installed from npm url("$rootDir/../node_modules/jsc-android/dist") } google() jcenter() } } ``` #### `android/app/build.gradle`: ```groovy apply plugin: "com.android.application" import com.android.build.OutputFile /** * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets * and bundleReleaseJsAndAssets). * These basically call `react-native bundle` with the correct arguments during the Android build * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the * bundle directly from the development server. Below you can see all the possible configurations * and their defaults. If you decide to add a configuration block, make sure to add it before the * `apply from: "../../node_modules/react-native/react.gradle"` line. * * project.ext.react = [ * // the name of the generated asset file containing your JS bundle * bundleAssetName: "index.android.bundle", * * // the entry file for bundle generation * entryFile: "index.android.js", * * // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format * bundleCommand: "ram-bundle", * * // whether to bundle JS and assets in debug mode * bundleInDebug: false, * * // whether to bundle JS and assets in release mode * bundleInRelease: true, * * // whether to bundle JS and assets in another build variant (if configured). * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants * // The configuration property can be in the following formats * // 'bundleIn${productFlavor}${buildType}' * // 'bundleIn${buildType}' * // bundleInFreeDebug: true, * // bundleInPaidRelease: true, * // bundleInBeta: true, * * // whether to disable dev mode in custom build variants (by default only disabled in release) * // for example: to disable dev mode in the staging build type (if configured) * devDisabledInStaging: true, * // The configuration property can be in the following formats * // 'devDisabledIn${productFlavor}${buildType}' * // 'devDisabledIn${buildType}' * * // the root of your project, i.e. where "package.json" lives * root: "../../", * * // where to put the JS bundle asset in debug mode * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", * * // where to put the JS bundle asset in release mode * jsBundleDirRelease: "$buildDir/intermediates/assets/release", * * // where to put drawable resources / React Native assets, e.g. the ones you use via * // require('./image.png')), in debug mode * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", * * // where to put drawable resources / React Native assets, e.g. the ones you use via * // require('./image.png')), in release mode * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", * * // by default the gradle tasks are skipped if none of the JS files or assets change; this means * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to * // date; if you have any other folders that you want to ignore for performance reasons (gradle * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ * // for example, you might want to remove it from here. * inputExcludes: ["android/**", "ios/**"], * * // override which node gets called and with what additional arguments * nodeExecutableAndArgs: ["node"], * * // supply additional arguments to the packager * extraPackagerArgs: [] * ] */ project.ext.react = [ entryFile: "index.js", enableHermes: false, // clean and rebuild if changing ] apply from: "../../node_modules/react-native/react.gradle" /** * Set this to true to create two separate APKs instead of one: * - An APK that only works on ARM devices * - An APK that only works on x86 devices * The advantage is the size of the APK is reduced by about 4MB. * Upload all the APKs to the Play Store and people will download * the correct one based on the CPU architecture of their device. */ def enableSeparateBuildPerCPUArchitecture = false /** * Run Proguard to shrink the Java bytecode in release builds. */ def enableProguardInReleaseBuilds = false /** * The preferred build flavor of JavaScriptCore. * * For example, to use the international variant, you can use: * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` * * The international variant includes ICU i18n library and necessary data * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that * give correct results when using with locales other than en-US. Note that * this variant is about 6MiB larger per architecture than default. */ def jscFlavor = 'org.webkit:android-jsc:+' /** * Whether to enable the Hermes VM. * * This should be set on project.ext.react and mirrored here. If it is not set * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode * and the benefits of using Hermes will therefore be sharply reduced. */ def enableHermes = project.ext.react.get("enableHermes", false); android { compileSdkVersion rootProject.ext.compileSdkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } defaultConfig { applicationId "nl.qscope.promo" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" } splits { abi { reset() enable enableSeparateBuildPerCPUArchitecture universalApk false // If true, also generate a universal APK include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" } } signingConfigs { debug { storeFile file('debug.keystore') storePassword 'android' keyAlias 'androiddebugkey' keyPassword 'android' } } buildTypes { debug { signingConfig signingConfigs.debug } release { // Caution! In production, you need to generate your own keystore file. // see https://facebook.github.io/react-native/docs/signed-apk-android. signingConfig signingConfigs.debug minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } } // applicationVariants are e.g. debug, release applicationVariants.all { variant -> variant.outputs.each { output -> // For each separate APK per architecture, set a unique version code as described here: // https://developer.android.com/studio/build/configure-apk-splits.html def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] def abi = output.getFilter(OutputFile.ABI) if (abi != null) { // null for the universal-debug, universal-release variants output.versionCodeOverride = versionCodes.get(abi) * 1048576 + defaultConfig.versionCode } } } packagingOptions { pickFirst '**/armeabi-v7a/libc++_shared.so' pickFirst '**/x86/libc++_shared.so' pickFirst '**/arm64-v8a/libc++_shared.so' pickFirst '**/x86_64/libc++_shared.so' pickFirst '**/x86/libjsc.so' pickFirst '**/armeabi-v7a/libjsc.so' } } dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) implementation "com.facebook.react:react-native:+" // From node_modules implementation 'androidx.appcompat:appcompat:1.1.0-rc01' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02' if (enableHermes) { def hermesPath = "../../node_modules/hermesvm/android/"; debugImplementation files(hermesPath + "hermes-debug.aar") releaseImplementation files(hermesPath + "hermes-release.aar") } else { implementation jscFlavor } } // Run this once to be able to run the application with BUCK // puts all compile dependencies into folder libs for BUCK to use task copyDownloadableDepsToLibs(type: Copy) { from configurations.compile into 'libs' } apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) apply plugin: 'com.google.gms.google-services' ``` #### `android/settings.gradle`: ```groovy rootProject.name = 'promo' apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) include ':app' ``` #### `MainApplication.java`: ```java package nl.qscope.promo; import android.app.Application; import android.util.Log; import com.facebook.react.PackageList; import com.facebook.hermes.reactexecutor.HermesExecutorFactory; import com.facebook.react.bridge.JavaScriptExecutorFactory; import com.facebook.react.ReactApplication; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.soloader.SoLoader; import java.util.List; public class MainApplication extends Application implements ReactApplication { private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { @Override public boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; } @Override protected List getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
return packages;
}
@Override
protected String getJSMainModuleName() {
return "index";
}
};
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
}
```
#### `AndroidManifest.xml`:
```xml
```
Environment
Click To Expand
**`react-native info` output:** ``` System: OS: macOS 10.14.5 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Memory: 5.14 GB / 32.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 12.10.0 - ~/.nvm/versions/node/v12.10.0/bin/node Yarn: 1.17.3 - /usr/local/bin/yarn npm: 6.10.3 - ~/.nvm/versions/node/v12.10.0/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3 IDEs: Android Studio: 3.5 AI-191.8026.42.35.5791312 Xcode: 10.3/10G8 - /usr/bin/xcodebuild npmPackages: react: 16.8.6 => 16.8.6 react-native: 0.60.5 => 0.60.5 ``` - **Platform that you're experiencing the issue on**: - [ ] iOS - [ ] Android - [ ] **iOS** but have not tested behavior on Android - [ ] **Android** but have not tested behavior on iOS - [x] Both - **`react-native-firebase` version you're using that has this issue:** - 0.60.5 - **`Firebase` module(s) you're using that has the issue:** - Authentication - **Are you using `TypeScript`?** - `Yes`