Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript error with Components inside Stage #46

Open
hellhorse123 opened this issue Nov 28, 2023 · 3 comments
Open

Typescript error with Components inside Stage #46

hellhorse123 opened this issue Nov 28, 2023 · 3 comments

Comments

@hellhorse123
Copy link

i get error "Type '{ children: Element; width: string; height: string; params: { backgroundColor: string; }; }' is not assignable to type 'IntrinsicAttributes & StageProps'.
Property 'children' does not exist on type 'IntrinsicAttributes & StageProps'.ts(2322)
(alias) const Stage: React.FC

It means, that in props of scene we don't have field children

@gky360
Copy link
Owner

gky360 commented Nov 28, 2023

This is because react-ngl does not currently support the latest version of React.
However, thanks to #38, react-ngl at the latest master branch may possibly be compatible with the latest version of React.
Try installing react-ngl from the master branch as follows, for example:

npm i 'git+https://github.com/gky360/react-ngl.git'

@hellhorse123
Copy link
Author

hellhorse123 commented Nov 29, 2023

I get error
npm ERR! Found: react@18.2.0 npm ERR! node_modules/react npm ERR! react@"^18.2.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.13.1" from react-ngl@0.2.3

Is it possible to update the react version to 18?

With --legacy-peer-deps or --force I can't install it too. Get errors of many old libs. (If need, I will provide full errors)

@hellhorse123
Copy link
Author

I apologize in advance for writing this here, are you still working on this library? It’s just that there haven’t been any commits for a long time, I noticed. And do you have a telegram to contact you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants