-
Notifications
You must be signed in to change notification settings - Fork 546
Description
Description
I'm building a web project with vite/esbuild and I get the following error on the latest version (1.11.7):
[cause]: ../../node_modules/@shopify/react-native-skia/lib/module/skia/NativeSetup.js (2:7): "default" is not exported by "../../node_modules/@shopify/react-native-skia/lib/module/specs/NativeSkiaModule.web.js", imported by "../../node_modules/@shopify/react-native-skia/lib/module/skia/NativeSetup.js".
file: /Users/sam/Work/Phase/phase-monorepo/node_modules/@shopify/react-native-skia/lib/module/skia/NativeSetup.js:2:7
It looks like NativeSkiaModule.ts has a default export (https://github.com/Shopify/react-native-skia/blob/main/packages/skia/src/specs/NativeSkiaModule.ts#L9) but NativeSkiaModule.web.ts does not (https://github.com/Shopify/react-native-skia/blob/main/packages/skia/src/specs/NativeSkiaModule.web.ts). Patching the file with export default {} seems to work.
I'm not sure if the best fix would be to add the default export or change how it's being imported in NativeSetup.ts.
React Native Skia Version
1.11.7
React Native Version
0.77.0
Using New Architecture
- Enabled
Steps to Reproduce
My project is a complex monorepo so I don't know what the most basic repro is for it, but I'm hoping it's clear from the report what's wrong here even if it doesn't happen in metro builds. I can try to create a repro if you think that's necessary.
Snack, Code Example, Screenshot, or Link to Repository
n/a