Skip to content
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

Found Error TypeScript when run yarn tsc #6044

Open
hunglv156 opened this issue May 24, 2024 · 3 comments
Open

Found Error TypeScript when run yarn tsc #6044

hunglv156 opened this issue May 24, 2024 · 3 comments
Labels
Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS

Comments

@hunglv156
Copy link

Description

When I run project, the app is still ok, but when run yarn tsc to Run a compile based on a backwards look through the fs for a tsconfig.json have error:

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/sharedTransitions/ProgressTransitionManager.ts:237:10 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

237 global.ProgressTransitionRegister = new Proxy(
~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/sharedTransitions/ProgressTransitionManager.ts:250:12 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

250 global.ProgressTransitionRegister = createProgressTransitionRegister();
~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/sharedTransitions/SharedTransition.ts:60:14 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

60 global._notifyAboutProgress(viewTag, newStyles, true);
~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/sharedTransitions/SharedTransition.ts:230:27 - error TS2532: Object is possibly 'undefined'.

230 progress * (targetMatrix[i] - currentMatrix[i]) +
~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/sharedTransitions/SharedTransition.ts:230:45 - error TS2532: Object is possibly 'undefined'.

230 progress * (targetMatrix[i] - currentMatrix[i]) +
~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/sharedTransitions/SharedTransition.ts:231:15 - error TS2532: Object is possibly 'undefined'.

231 currentMatrix[i];
~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/sharedTransitions/SharedTransition.ts:248:14 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

248 global._notifyAboutProgress(viewTag, newStyles, true);
~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/animationsManager.ts:101:16 - error TS2339: Property 'presetName' does not exist on type 'Function'.

101 ? config.presetName
~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/animationsManager.ts:163:13 - error TS2304: Cannot find name 'DOMRect'.

163 snapshot: DOMRect
~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/animationsManager.ts:169:24 - error TS2812: Property 'getBoundingClientRect' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

169 const rect = element.getBoundingClientRect();
~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentStyle.ts:42:29 - error TS2812: Property 'getBoundingClientRect' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

42 const parentRect = parent.getBoundingClientRect();
~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentStyle.ts:45:5 - error TS2304: Cannot find name 'getComputedStyle'.

45 getComputedStyle(parent).borderTopWidth
~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentStyle.ts:49:5 - error TS2304: Cannot find name 'getComputedStyle'.

49 getComputedStyle(parent).borderLeftWidth
~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentStyle.ts:52:29 - error TS2812: Property 'getBoundingClientRect' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

52 const dummyRect = element.getBoundingClientRect();
~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentStyle.ts:57:13 - error TS2812: Property 'style' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

57 element.style.top = `${
~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentStyle.ts:63:13 - error TS2812: Property 'style' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

63 element.style.left = `${
~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentStyle.ts:73:9 - error TS2812: Property 'style' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

73 dummy.style.transform = '';
~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentStyle.ts:74:9 - error TS2812: Property 'style' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

74 dummy.style.position = 'absolute';
~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentStyle.ts:75:9 - error TS2812: Property 'style' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

75 dummy.style.top = ${snapshot.top}px;
~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentStyle.ts:76:9 - error TS2812: Property 'style' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

76 dummy.style.left = ${snapshot.left}px;
~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentStyle.ts:77:9 - error TS2812: Property 'style' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

77 dummy.style.width = ${snapshot.width}px;
~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentStyle.ts:78:9 - error TS2812: Property 'style' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

78 dummy.style.height = ${snapshot.height}px;
~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentStyle.ts:79:9 - error TS2812: Property 'style' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

79 dummy.style.margin = '0px'; // tmpElement has absolute position, so margin is not necessary
~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentStyle.ts:81:13 - error TS2812: Property 'parentElement' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

81 if (dummy.parentElement) {
~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentStyle.ts:82:37 - error TS2812: Property 'parentElement' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

82 fixElementPosition(dummy, dummy.parentElement, snapshot);
~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:132:24 - error TS2812: Property 'getBoundingClientRect' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

132 const rect = element.getBoundingClientRect();
~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:152:11 - error TS2812: Property 'style' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

152 element.style.animationName = animationName;
~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:153:11 - error TS2812: Property 'style' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

153 element.style.animationDuration = ${duration}s;
~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:154:11 - error TS2812: Property 'style' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

154 element.style.animationDelay = ${delay}s;
~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:155:11 - error TS2812: Property 'style' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

155 element.style.animationTimingFunction = easing;
~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:157:11 - error TS2812: Property 'onanimationend' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

157 element.onanimationend = () => {
~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:159:13 - error TS2812: Property 'removeEventListener' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

159 element.removeEventListener('animationcancel', animationCancelHandler);
~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:164:13 - error TS2812: Property 'removeEventListener' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

164 element.removeEventListener('animationcancel', animationCancelHandler);
~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:168:11 - error TS2812: Property 'onanimationstart' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

168 element.onanimationstart = () => {
~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:176:13 - error TS2812: Property 'addEventListener' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

176 element.addEventListener('animationcancel', animationCancelHandler);
~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:177:13 - error TS2812: Property 'style' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

177 element.style.transform = convertTransformToString(existingTransform);
~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:223:11 - error TS2812: Property 'style' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

223 element.style.transform = convertTransformToString(transformCopy);
~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:237:17 - error TS2812: Property 'scrollTop' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

237 if (current.scrollTop !== 0 && scrollOffsets.scrollTopOffset === 0) {
~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:238:47 - error TS2812: Property 'scrollTop' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

238 scrollOffsets.scrollTopOffset = current.scrollTop;
~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:241:17 - error TS2812: Property 'scrollLeft' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

241 if (current.scrollLeft !== 0 && scrollOffsets.scrollLeftOffset === 0) {
~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:242:48 - error TS2812: Property 'scrollLeft' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

242 scrollOffsets.scrollLeftOffset = current.scrollLeft;
~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:245:23 - error TS2812: Property 'parentElement' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

245 current = current.parentElement;
~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:255:26 - error TS2812: Property 'offsetParent' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

255 const parent = element.offsetParent;
~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:256:25 - error TS2812: Property 'cloneNode' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

256 const dummy = element.cloneNode() as ReanimatedHTMLElement;
~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:259:11 - error TS2812: Property 'style' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

259 element.style.animationName = '';
~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:261:11 - error TS2812: Property 'style' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

261 element.style.visibility = 'hidden';
~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:268:18 - error TS2812: Property 'firstChild' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

268 while (element.firstChild) {
~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:269:11 - error TS2339: Property 'appendChild' does not exist on type 'ReanimatedHTMLElement'.

269 dummy.appendChild(element.firstChild);
~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:269:31 - error TS2812: Property 'firstChild' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.

269 dummy.appendChild(element.firstChild);
~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:302:40 - error TS2339: Property 'onanimationend' does not exist on type 'ReanimatedHTMLElement'.

302 const originalOnAnimationEnd = dummy.onanimationend;
~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:304:9 - error TS2339: Property 'onanimationend' does not exist on type 'ReanimatedHTMLElement'.

304 dummy.onanimationend = function (event: AnimationEvent) {
~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/componentUtils.ts:314:9 - error TS2339: Property 'addEventListener' does not exist on type 'ReanimatedHTMLElement'.

314 dummy.addEventListener('animationcancel', () => {
~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/createAnimation.ts:90:3 - error TS18048: 'newAnimationData' is possibly 'undefined'.

90 newAnimationData.name = keyframeName;
~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/createAnimation.ts:94:24 - error TS2345: Argument of type 'AnimationData | undefined' is not assignable to parameter of type 'AnimationData'.
Type 'undefined' is not assignable to type 'AnimationData'.

94 addExistingTransform(newAnimationData, newTransform);
~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/createAnimation.ts:96:54 - error TS2345: Argument of type 'AnimationData | undefined' is not assignable to parameter of type 'AnimationData'.
Type 'undefined' is not assignable to type 'AnimationData'.

96 const keyframe = convertAnimationObjectToKeyframes(newAnimationData);
~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:25:5 - error TS2584: Cannot find name 'document'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'.

25 document.getElementById(PREDEFINED_WEB_ANIMATIONS_ID) !== null
~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:30:40 - error TS2584: Cannot find name 'document'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'.

30 const predefinedAnimationsStyleTag = document.createElement('style');
~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:48:36 - error TS2584: Cannot find name 'document'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'.

48 const customAnimationsStyleTag = document.createElement('style');
~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:51:3 - error TS2584: Cannot find name 'document'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'.

51 document.head.appendChild(predefinedAnimationsStyleTag);
~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:52:3 - error TS2584: Cannot find name 'document'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'.

52 document.head.appendChild(customAnimationsStyleTag);
~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:61:20 - error TS2584: Cannot find name 'document'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'.

61 const styleTag = document.getElementById(
~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:65:17 - error TS2812: Property 'sheet' does not exist on type 'HTMLStyleElement'. Try changing the 'lib' compiler option to include 'dom'.

65 if (!styleTag.sheet) {
~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:72:12 - error TS2812: Property 'sheet' does not exist on type 'HTMLStyleElement'. Try changing the 'lib' compiler option to include 'dom'.

72 styleTag.sheet.insertRule(keyframe, 0);
~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:78:57 - error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.

78 const nextAnimationIndex = animationNameToIndex.get(nextAnimationName);
~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:84:30 - error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.

84 animationNameToIndex.set(animationNameList[i], nextAnimationIndex + 1);
~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:94:20 - error TS2584: Cannot find name 'document'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'.

94 const styleTag = document.getElementById(
~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:104:12 - error TS2812: Property 'sheet' does not exist on type 'HTMLStyleElement'. Try changing the 'lib' compiler option to include 'dom'.

104 styleTag.sheet?.deleteRule(currentAnimationIndex);
~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:110:57 - error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.

110 const nextAnimationIndex = animationNameToIndex.get(nextAnimationName);
~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:116:30 - error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.

116 animationNameToIndex.set(animationNameList[i], nextAnimationIndex - 1);
~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:138:74 - error TS2304: Cannot find name 'Node'.

138 function reattachElementToAncestor(child: ReanimatedHTMLElement, parent: Node) {
~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:152:40 - error TS2339: Property 'onanimationend' does not exist on type 'ReanimatedHTMLElement'.

152 const originalOnAnimationEnd = child.onanimationend;
~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:154:9 - error TS2339: Property 'onanimationend' does not exist on type 'ReanimatedHTMLElement'.

154 child.onanimationend = function (event: AnimationEvent) {
~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:164:9 - error TS2304: Cannot find name 'Node'.

164 root: Node
~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:168:25 - error TS2693: 'HTMLElement' only refers to a type, but is being used as a value here.

168 if (!(node instanceof HTMLElement)) {
~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:176:36 - error TS2339: Property 'children' does not exist on type 'ReanimatedHTMLElement'.

176 const children = Array.from(node.children);
~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:227:24 - error TS2304: Cannot find name 'MutationObserver'.

227 const observer = new MutationObserver((mutationsList) => {
~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:227:42 - error TS7006: Parameter 'mutationsList' implicitly has an 'any' type.

227 const observer = new MutationObserver((mutationsList) => {
~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:246:20 - error TS2584: Cannot find name 'document'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'.

246 observer.observe(document.body, { childList: true, subtree: true });
~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:249:38 - error TS2304: Cannot find name 'DOMRect'.

249 export function areDOMRectsEqual(r1: DOMRect, r2: DOMRect) {
~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/layoutReanimation/web/domUtils.ts:249:51 - error TS2304: Cannot find name 'DOMRect'.

249 export function areDOMRectsEqual(r1: DOMRect, r2: DOMRect) {
~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/mappers.ts:208:33 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

208 let mapperRegistry = global.__mapperRegistry;
~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/mappers.ts:210:31 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

210 mapperRegistry = global.__mapperRegistry = createMapperRegistry();
~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/mappers.ts:220:35 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

220 const mapperRegistry = global.__mapperRegistry;
~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/NativeReanimated/NativeReanimated.ts:68:12 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

68 global._REANIMATED_VERSION_JS !== undefined &&
~~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/NativeReanimated/NativeReanimated.ts:69:12 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

69 global._REANIMATED_VERSION_JS !== jsVersion
~~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/NativeReanimated/NativeReanimated.ts:73:169 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

73 See `https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting#another-instance-of-reanimated-was-detected\` for more details. Previous: ${global._REANIMATED_VERSION_JS}, current: ${jsVersion}.`
~~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/NativeReanimated/NativeReanimated.ts:86:12 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

86 global._REANIMATED_VERSION_JS = jsVersion;
~~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/NativeReanimated/NativeReanimated.ts:87:16 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

87 if (global.__reanimatedModuleProxy === undefined) {
~~~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/NativeReanimated/NativeReanimated.ts:91:16 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

91 if (global.__reanimatedModuleProxy === undefined) {
~~~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/NativeReanimated/NativeReanimated.ts:100:37 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

100 this.InnerNativeModule = global.__reanimatedModuleProxy;
~~~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/platform-specific/checkCppVersion.ts:5:29 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

5 const cppVersion = global._REANIMATED_VERSION_CPP;
~~~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/platformFunctions/dispatchCommand.ts:43:10 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

43 global._dispatchCommandFabric!(shadowNodeWrapper, commandName, args);
~~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/platformFunctions/dispatchCommand.ts:57:10 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

57 global._dispatchCommandPaper!(viewTag, commandName, args);
~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/platformFunctions/measure.ts:43:27 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

43 const measured = global._measureFabric!(viewTag as ShadowNodeWrapper);
~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/platformFunctions/measure.ts:78:27 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

78 const measured = global._measurePaper!(viewTag as number);
~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/platformFunctions/scrollTo.ts:61:10 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

61 global._scrollToPaper!(viewTag, x, y, animated);
~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/platformFunctions/setGestureState.ts:16:10 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

16 global._setGestureState(handlerTag, newState);
~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/platformFunctions/setNativeProps.ts:43:10 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

43 global._updatePropsFabric!([{ shadowNodeWrapper, updates }]);
~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/platformFunctions/setNativeProps.ts:60:10 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

60 global._updatePropsPaper!([{ tag, name, updates }]);
~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/PropsRegistry.ts:24:10 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

24 global._removeFromPropsRegistry(viewTags);
~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/runtimes.ts:71:14 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

71 global._scheduleOnRuntime(
~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/screenTransition/RNScreensTurboModule.ts:21:10 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

21 global.RNScreensTurboModule || {
~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/screenTransition/swipeSimulator.ts:24:24 - error TS2304: Cannot find name '_getAnimationTimestamp'.

24 const elapsedTime = (_getAnimationTimestamp() - startingTimestamp) / 1000;
~~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/screenTransition/swipeSimulator.ts:79:26 - error TS2304: Cannot find name '_getAnimationTimestamp'.

79 const startTimestamp = _getAnimationTimestamp();
~~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/shareables.ts:327:23 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

327 return global._makeShareableClone(
~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/shareables.ts:339:23 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

339 return global._makeShareableClone(
~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/shareables.ts:348:21 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

348 return global._makeShareableClone(toAdapt, value) as FlatShareableRef;
~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/shareables.ts:350:19 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

350 return global._makeShareableClone(value, undefined);
~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/threads.ts:28:10 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

28 global.__callMicrotasks = () => {
~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/threads.ts:36:9 - error TS2722: Cannot invoke an object which is possibly 'undefined'.

36 microtasksQueueindex;
~~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/threads.ts:39:14 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

39 global._maybeFlushUIUpdatesQueue();
~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/threads.ts:48:10 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

48 global.__callMicrotasks();
~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/threads.ts:247:12 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

247 global._scheduleOnJS(
~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/UpdateLayoutAnimations.ts:57:7 - error TS2304: Cannot find name 'Keyframe'.

57 | Keyframe
~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/UpdateProps.ts:33:12 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

33 global.UpdatePropsManager.update(viewDescriptors, updates);
~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/UpdateProps.ts:81:18 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

81 global._updatePropsFabric!(operations);
~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/UpdateProps.ts:111:18 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

111 global._updatePropsPaper!(operations);
~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/UpdateProps.ts:127:10 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

127 global.UpdatePropsManager = new Proxy({} as UpdatePropsManager, {
~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/UpdateProps.ts:137:12 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

137 global.UpdatePropsManager = createUpdatePropsManager();
~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/valueSetter.ts:45:14 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

45 global.__frameTimestamp || global._getAnimationTimestamp();
~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/valueSetter.ts:45:41 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

45 global.__frameTimestamp || global._getAnimationTimestamp();
~~~~~~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/valueUnpacker.ts:12:30 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

12 let workletsCache = global.__workletsCache;
~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/valueUnpacker.ts:13:28 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

13 let handleCache = global.__handleCache;
~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/valueUnpacker.ts:16:28 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

16 workletsCache = global.__workletsCache = new Map();
~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/valueUnpacker.ts:17:26 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

17 handleCache = global.__handleCache = new WeakMap();
~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/valueUnpacker.ts:24:18 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

24 if (global.evalWithSourceMap) {
~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/valueUnpacker.ts:29:29 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

29 workletFun = global.evalWithSourceMap(
~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/valueUnpacker.ts:34:25 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

34 } else if (global.evalWithSourceUrl) {
~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/valueUnpacker.ts:39:29 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

39 workletFun = global.evalWithSourceUrl(
~~~~~~~~~~~~~~~~~

node_modules/react-native-reanimated/src/reanimated2/valueUnpacker.ts:74:94 - error TS2304: Cannot find name '_toString'.

74 `[Reanimated] Data type in category "${category}" not recognized by value unpacker: "${_toString(
~~~~~~~~~

Anyone have idea to fix this issue?

Steps to reproduce

  1. Yarn
  2. Yarn tsc

Snack or a link to a repository

https://stackoverflow.com/help/mcve.

Reanimated version

3.11.0

React Native version

0.74.1

Platforms

Android, iOS

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

@github-actions github-actions bot added the Missing repro This issue need minimum repro scenario label May 24, 2024
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@github-actions github-actions bot added Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS labels May 24, 2024
@billnbell3
Copy link

+1

@sabrina-tw
Copy link

Facing similar errors on react-native-reanimated 3.11.0, and react-native 0.73.8, e.g.:

   node_modules/react-native-reanimated/src/reanimated2/core.ts:45:10 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

    45   global._log = console.log;
                ~~~~
    node_modules/react-native-reanimated/src/reanimated2/core.ts:46:10 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

    46   global._getAnimationTimestamp = () => performance.now();
                ~~~~~~~~~~~~~~~~~~~~~~
    node_modules/react-native-reanimated/src/reanimated2/core.ts:78:15 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

    78   if (!global.__sensorContainer) {
                     ~~~~~~~~~~~~~~~~~
    node_modules/react-native-reanimated/src/reanimated2/core.ts:79:12 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

    79     global.__sensorContainer = new SensorContainer();
                  ~~~~~~~~~~~~~~~~~
    node_modules/react-native-reanimated/src/reanimated2/core.ts:81:17 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

    81   return global.__sensorContainer;
                       ~~~~~~~~~~~~~~~~~
    node_modules/react-native-reanimated/src/reanimated2/core.ts:91:12 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

    91     global.__frameTimestamp = eventTimestamp;
                  ~~~~~~~~~~~~~~~~
    node_modules/react-native-reanimated/src/reanimated2/core.ts:93:12 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

    93     global.__flushAnimationFrame(eventTimestamp);
                  ~~~~~~~~~~~~~~~~~~~~~
    node_modules/react-native-reanimated/src/reanimated2/core.ts:94:12 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

    94     global.__frameTimestamp = undefined;
                  ~~~~~~~~~~~~~~~~
    node_modules/react-native-reanimated/src/reanimated2/core.ts:115:24 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

    115     const now = global._getAnimationTimestamp();
                               ~~~~~~~~~~~~~~~~~~~~~~
    node_modules/react-native-reanimated/src/reanimated2/core.ts:116:12 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

    116     global.__frameTimestamp = now;
                   ~~~~~~~~~~~~~~~~
    node_modules/react-native-reanimated/src/reanimated2/core.ts:118:12 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

    118     global.__flushAnimationFrame(now);
                   ~~~~~~~~~~~~~~~~~~~~~
    node_modules/react-native-reanimated/src/reanimated2/core.ts:119:12 - error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

    119     global.__frameTimestamp = undefined;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS
Projects
None yet
Development

No branches or pull requests

3 participants