viro icon indicating copy to clipboard operation
viro copied to clipboard

TypeError: Cannot read property 'setJSMaterials' of null

Open ramangupta1602 opened this issue 9 months ago • 4 comments

Hi @adelarsq, @bilewinters, @oitoito, @schiller-manuel, and @alexttyip,

I've used the latest version of this package along with the latest version of React Native, yet I'm encountering this error. Could you please advise on how I can resolve it?

ramangupta1602 avatar Mar 11 '25 21:03 ramangupta1602

Hey @ramangupta1602. Right now @doranteseduardo is working on the library's maintaince. I haven't worked on the project for a while.

@doranteseduardo Can you take a look on that?

adelarsq avatar Mar 16 '25 19:03 adelarsq

update? did u fix it?

Ryan-Chico avatar Apr 20 '25 10:04 Ryan-Chico

add this to your app.json or app.config.json :

"plugins": ["@reactvision/react-viro"],

M7T5M3P avatar Apr 24 '25 20:04 M7T5M3P

After adding the plugin to app.json, don't forget to prebuild before running the app. I faced this error too, the reason why you see it is that viro library is not being linked properly to your app at build time. The prebuild step is npx expo prebuild --clean

malika-k avatar Jun 18 '25 13:06 malika-k