gltfjsx
gltfjsx copied to clipboard
Needs updating to React@17
When I run npm i -D gltfjsx I get the following error:
code ERESOLVE
ERESOLVE unable to resolve dependency tree
Found: [email protected]
node_modules/react
peer react@"^16.8 || ^17.0" from @radix-ui/[email protected]
node_modules/@radix-ui/react-arrow
@radix-ui/react-arrow@"0.0.11" from @radix-ui/[email protected]
node_modules/@radix-ui/react-popper
@radix-ui/react-popper@"0.0.14" from @radix-ui/[email protected]
node_modules/@radix-ui/react-tooltip
@radix-ui/react-tooltip@"0.0.16" from [email protected]
node_modules/leva
peer react@"^16.8 || ^17.0" from @radix-ui/[email protected]
node_modules/@radix-ui/react-arrow/node_modules/@radix-ui/react-polymorphic
@radix-ui/react-polymorphic@"0.0.10" from @radix-ui/[email protected]
node_modules/@radix-ui/react-arrow
@radix-ui/react-arrow@"0.0.11" from @radix-ui/[email protected]
node_modules/@radix-ui/react-popper
@radix-ui/react-popper@"0.0.14" from @radix-ui/[email protected]
node_modules/@radix-ui/react-tooltip
@radix-ui/react-polymorphic@"0.0.10" from @radix-ui/[email protected]
node_modules/@radix-ui/react-arrow/node_modules/@radix-ui/react-primitive
@radix-ui/react-primitive@"0.0.11" from @radix-ui/[email protected]
node_modules/@radix-ui/react-arrow
@radix-ui/react-arrow@"0.0.11" from @radix-ui/[email protected]
node_modules/@radix-ui/react-popper
46 more (@radix-ui/react-primitive, ...)
Could not resolve dependency:
peer react@"^16.0.0" from [email protected]
node_modules/ink/node_modules/react-reconciler
react-reconciler@"^0.24.0" from [email protected]
node_modules/ink
ink@"^3.0.7" from [email protected]
node_modules/gltfjsx
dev gltfjsx@"*" from the root project
Fix the upstream dependency conflict, or retry
this command with --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
See C:\Users\Lewy\AppData\Local\npm-cache\eresolve-report.txt for a full report.
A complete log of this run can be found in:
C:\Users\Lewy\AppData\Local\npm-cache\_logs\2021-06-07T07_07_40_111Z-debug.log
If I install with --legacy-peer-deps then it installs OK but running npx gltfjsx model.glb gives a whole load of errors including:
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
- 2. You might be breaking the Rules of Hooks
- 3. You might have more than one copy of React in the same app
So presumably it's now complaining that I've forced an install of both React@16 (peerdep) and React@17 (standard dep).
are you using it as a part of the repo? i always just use it with npx and then it cant be confused with any other react version in node-modules
Yeah, using it via npx works fine and that's what I've been doing. However when working on a client project I prefer to use version control for all tooling. In this case I want the client to be able to update models once I've passed over the project - even if they don't do that for two years I'd rather all the versions are locked so that everything still just works.
i updated it to react 17