Issues with the Vite + React framework -Property 'div' does not exist on type 'JSX.IntrinsicElement'

Hi there,

This engine is super awesome and I wanted to learn how to use it and apply it to creating my own portfolio project that I’m working on.

I’m using the Unity Engine integration and wanted to deploy it as a react app, but I get the error above in the JSX that’s returning in App.tsx file.

I’ve attempted to install via npm ‘npm i’ and that doesn’t fix the error. Removing the offending code seems to resolve the problem and render my application in the browser and it works, but I’m not able to add div/button/p elements from html into the App.tsx.

I apologize if I’m just missing something, but I can’t seem to think of what it might be.

Apologies if this has been asked before and thank you. I’ve attached an image of the code with the error.

Original Post on Discord

by user 156277358247018496

by user 156277358247018496

The specific error ^

by user 156277358247018496

Also this error when the div is in between the NeedleEngine element:

by user 156277358247018496

But when moved outside of that, it seems to render

by user 156277358247018496

Hi, this sounds like a similar issue described here. Can you check if the provided link in the reply fixes it for you? Discord

I did check that, but it seems that there was a push to the repo that fixed it for that particular case, but for this it seems as though it hasn’t been fixed.

I just create a Unity project using either the samples or a scene from scratch and it gives me the errors described above.

by user 156277358247018496

I’ll try it here

I can reproduce the errors above - those are related to the renderer being created lazily now - I have fixed it locally and will publish a new version in a little bit. Just looking into the JSX errors at the moment - they where definitely not there last time. It also seems like other people have similar issues (with other react+vite projects) Property 'div' does not exist on type 'JSX.IntrinsicElements'. · Issue #14011 · vitejs/vite · GitHub

A new version is out + updated the repository. Can you pull the update and re-install it (you can perform a “clean” installation of all packages by holding ALT and then clicking the Install button on the ExportInfo component). All errors should then be gone

Awesome I’ll give it a try later today as soon as I can. Thank you. I’ll let you know if it’s working on my end

by user 156277358247018496

Works great now, thank you!

by user 156277358247018496