Getting the following error while building a react project in azure DevOps pipeline (able to build the project locally, pretty sure we didn’t change the dependencies):
Attempted import error: 'Date3DTexture is not exported from 'three'.
- “three”: “^0.137.5”,
- “three-stdlib”: “^2.8.8”,
- “three.map.control”: “^1.6.0”,
Can anyone please help? Thanks!
It looks like three-stdlib requires three.js r138 or higher, if you are using KTX2Loader. The Data3DTexture class was renamed from DataTexture3D in r138. Add new render target types for 3D and array textures. by Mugen87 · Pull Request #23498 · mrdoob/three.js · GitHub
Thanks, @donmccurdy, we fixed it by upgrading
0.143.0. Though we don’t use KTX2Loader in our code. Cheers!
oh that’s unfortunate that the bundler doesn’t ignore it. i think in dev mode it doesn’t tree-shake yet, only in production. but if updating worked that’s great!
Thanks @tirth.patel.ss I can confirm this happens, and that bumping
0.143.0 fixes the issue