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

[Vite] [Web] No matching export in RNRenderer.web.js for import "RNRenderer" #6265

Closed
natew opened this issue Jul 13, 2024 · 7 comments · Fixed by #6266
Closed

[Vite] [Web] No matching export in RNRenderer.web.js for import "RNRenderer" #6265

natew opened this issue Jul 13, 2024 · 7 comments · Fixed by #6266
Labels
Missing repro This issue need minimum repro scenario Platform: Web This issue is specific to web

Comments

@natew
Copy link

natew commented Jul 13, 2024

Description

As of 3.13 I believe this error starts to occur in Vite:

 ERROR  Build failed with 1 error:                                                            9:11:57 AM
../../node_modules/react-native-reanimated/lib/module/createAnimatedComponent/createAnimatedComponent.js:12:9: ERROR: No matching export in "../../node_modules/react-native-reanimated/lib/module/platform-specific/RNRenderer.web.js" for import "RNRenderer"

Steps to reproduce

Sorry to not have a great repro, but if you create a Vite app and import the latest Reanimated you will see it! Only posting here without full repro because the actual fix is pretty simple!

The file react-native-reanimated/lib/module/platform-specific/RNRenderer.web.js doesn't export anything:

'use strict';

// RNRender is not used for web. An export is still defined to eliminate warnings from bundlers such as esbuild.
export {};
//# sourceMappingURL=RNRenderer.web.js.map

Which cases Vite to break. Instead, maybe we can export null?

Snack or a link to a repository

https://github.com/universal-future/vxrn

Reanimated version

3.14.0

React Native version

0.73.1

Platforms

Web

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 Platform: Web This issue is specific to web label Jul 13, 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 the Missing repro This issue need minimum repro scenario label Jul 13, 2024
@asadansari8840
Copy link

Hey !

This issue is also occuring on react native for web devlopment , React Native version : 0.74.3 .

Its shows a warning on web page :
WARNING in ./node_modules/react-native-reanimated/lib/module/createAnimatedComponent/createAnimatedComponent.js 221:29-67
export 'RNRenderer' (imported as 'RNRenderer') was not found in '../platform-specific/RNRenderer' (module has no exports)

Is anyone else also facing the same issue ?

@NicoVogel
Copy link

In my setup, this error occures starting version 3.13.0.
It works fine with version 3.12.0.

lkinasiewicz added a commit to lkinasiewicz/react-native-reanimated that referenced this issue Jul 15, 2024
github-merge-queue bot pushed a commit that referenced this issue Jul 15, 2024
## Summary

Fixes #6265 

## Test plan

Applications using reanimated should build properly using bundlers that
use ESM - e.g. Vite.
@asadansari8840
Copy link

In my setup, this error occures starting version 3.13.0. It works fine with version 3.12.0.

But i am developing the native and webapp with react native , when installing the reanimated 3.12.0 mobile app crashes says mismtach between react-native and reanimated versions, also web app got blank and just an empty root div.

Using react native 0.74.3 version
react-native-reanimated : 3.14.0

@Iof-Victor
Copy link

In my setup, this error occures starting version 3.13.0. It works fine with version 3.12.0.

But i am developing the native and webapp with react native , when installing the reanimated 3.12.0 mobile app crashes says mismtach between react-native and reanimated versions, also web app got blank and just an empty root div.

Using react native 0.74.3 version react-native-reanimated : 3.14.0

hi, did you find a solution for this problem? I am also facing this issues..

@thomasthachil
Copy link

Also seeing this issue trying to upgrade to to 3.14.0 (previously using 3.8.1). Seeing it on web

WARNING in ../../node_modules/react-native-reanimated/lib/module/createAnimatedComponent/createAnimatedComponent.js 221:29-67
export 'RNRenderer' (imported as 'RNRenderer') was not found in '../platform-specific/RNRenderer' (module has no exports)
 @ ../../node_modules/react-native-reanimated/lib/module/createAnimatedComponent/index.js 3:0-68 3:0-68
 @ ../../node_modules/react-native-reanimated/lib/module/Animated.js 3:0-68 3:0-68
 @ ../../node_modules/react-native-reanimated/lib/module/index.js 4:0-39 5:15-23

@ianmartorell
Copy link

I was seeing this error in 3.10.1 and it's gone after upgrading to 3.15.0. I checked the file RNRenderer.web.js and it was empty before upgrading, now it's not.

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: Web This issue is specific to web
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants