react-native-skia icon indicating copy to clipboard operation
react-native-skia copied to clipboard

Does not work with Expo router server mode and api routes on web

Open itsyoboieltr opened this issue 1 year ago • 2 comments

Description

image

Version

0.1.237

Steps to reproduce

  1. create a new expo router project with api routes
  2. try to load rn skia
  3. watch your app crash on web

Snack, code example, screenshot, or link to a repository

just follow the reprod steps

itsyoboieltr avatar Feb 01 '24 15:02 itsyoboieltr

That's interesting we indeed didn't consider this could be run on node, we might be able to update it to be robust if ran on node.

wcandillon avatar Feb 01 '24 15:02 wcandillon

This is not linked to the new API, but to the way Metro does its bundling. :)

I have fix ready to be merged for this, see a temp work around here: https://github.com/Shopify/react-native-skia/issues/2192#issuecomment-1926642335

@wcandillon we can close this issue to avoid redundancy with the other ones.

kimchouard avatar Feb 05 '24 10:02 kimchouard

@itsyoboieltr thank you for reporting this. We fixed this particular issue but the expo-router support as a whole as well in v0.1.240: https://shopify.github.io/react-native-skia/docs/getting-started/web#expo. I just tried it and it worked really well, let us know if you have any questions.

wcandillon avatar Feb 21 '24 07:02 wcandillon