-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
ThreeJS minimum version is too old #711
Comments
cc @agargaro - any thoughts on this? Sounds like builds are failing because we're trying to import BatchedMesh when it hasn't been made available in previous versions of three.js, yet. Perhaps an import statement like this would work: import { ... } from 'three';
import * as THREE from 'three';
const BatchedMesh = THREE.BatchedMesh || null; |
Yes, you are right. I will provide the fix shortly 🙏 |
@dmurvihill would you like to make a PR with this change? I'm not familiar with how to do this. |
I started getting an error some days ago:
but the above PR didn't seem to fix it, the version 0.7.8 still has the same issue. Was the PR supposed to fix this or is this something else...? |
The PR fixed it for native implementations and Vite. If it isn't fixed in your bundler then please provide your build process. |
@gkjohnson In my opinion, by modifing the three version in package.json like this could specify the version that your project depends on, it might helps :)
|
@timoisalive Same here, I found 2 solutions we could do in our own project:
|
Of course adjusting the peer dependency would fix this but this would make it a breaking change when it doesn't have to be. This is why I have asked for what bundler this is happening in it can be investigated. If it's the case that some bundlers are needlessly strict in this situation then there may be no other option beyond doing a major release and deprecating v0.7.7 and 0.7.8. |
I'm using webpack 5.94.0. |
Thanks @Adamatoma for the tips! If I downgrade to 0.7.4 I get another issue: Can't remember getting that before... 🤷 |
Were u able to get the solution? if yes..please tell me the same |
I don't use webpack but I tried it locally and it seems possible to skip that error by adding this to
Can this be considered a valid solution? |
There's no reason this should have to fail in Webpack bundles but unfortunately I don't have the time to track this down or look for alternatives. I've deprecated v0.7.7 and v0.7.8 and published v0.8.0 with a peer dependency requirement of three.js v0.158.0. If someone would like to update CI process to check for compatible three.js versions that would be great. |
Ok, thanks for your effort @gkjohnson , I updated the libraries as follows and finally the error is gone! 🥳
|
Still not working on 0.158. |
Description
You added imports of
BatchedMesh
recently. This package requiresthree >= 0.151
butBatchedMesh
wasn't added until 0.158. Update the peer dependency inpackage.json
to fix.Recommend adding
three-version
to your matrix strategy in GitHub Actions, to test with different verisions ofthree
.Reproduction steps
npm install [email protected]
npm test
Version
0.7.7
The text was updated successfully, but these errors were encountered: