Shopify / react-native-skia

High-performance React Native Graphics using Skia
https://shopify.github.io/react-native-skia
MIT License
6.68k stars 419 forks source link

Web: TypeError: Cannot read properties of undefined (reading 'Matrix') #1115

Closed Jonatthu closed 1 year ago

Jonatthu commented 1 year ago

Description

When using skia on the web, this is the error message when using webpack4 which is the default supported version of expo.

Cannot read properties of undefined (reading 'Matrix')
TypeError: Cannot read properties of undefined (reading 'Matrix')
    at Object.Matrix (http://localhost:6006/vendors~main.iframe.bundle.js:17253:169)
    at new JsiRenderNode (http://localhost:6006/vendors~main.iframe.bundle.js:5715:29)
    at new GroupNode (http://localhost:6006/vendors~main.iframe.bundle.js:5089:5)
    at JsiSkDOM.Group (http://localhost:6006/vendors~main.iframe.bundle.js:5141:142)
    at new Container (http://localhost:6006/vendors~main.iframe.bundle.js:9540:26)
    at http://localhost:6006/vendors~main.iframe.bundle.js:9453:12
    at mountMemo (http://localhost:6006/vendors~main.iframe.bundle.js:124410:19)
    at Object.useMemo (http://localhost:6006/vendors~main.iframe.bundle.js:124870:16)
    at useMemo (http://localhost:6006/vendors~main.iframe.bundle.js:165159:21)
    at http://localhost:6006/vendors~main.iframe.bundle.js:9452:74

Version

latest

Steps to reproduce

Please run yarn yarn storybook

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

https://github.com/Jonatthu/expo-template-storybook/tree/skia-setup https://github.com/Jonatthu/expo-template-storybook/blob/skia-setup/components/Button/Button.stories.tsx

Webpack config: https://github.com/Jonatthu/expo-template-storybook/blob/skia-setup/.storybook/main.js

image
wcandillon commented 1 year ago

closing as duplicate of #1084