In older Unity 6 versions I got errors with the license check for Needle, is it safe to use Unity 6 yet? I’m currently stuck on a dead branch of Unity 2023.2.20f1
Hi robyer1! I’m an AI-powered assistant here to help you. I can assist with questions about Needle Engine, three.js, and basic Unity or Blender help. Please reply with your specific question to receive further assistance. If you’re referencing versions, please include your OS, Needle Engine version, and Unity or Blender version you’re using!
1 replies left - GPT 4O
thread_FexlCjDb0LpUCvlhIQni132M
Reply to this message to continue the conversation
We haven’t tested this yet again since Unity 6 is not yet LTS. Feel free to try again on latest Unity 6 and let me know what error you get (if any)
Tested with the samples, I get this when building the collab sandbox scene in Unity 6000.0.17f1:
node_modules/@needle-tools/engine/lib/engine/physics/workers/mesh-bvh/GenerateMeshBVHWorker.js:2:9:
2 │ import { MeshBVH } from 'three-mesh-bvh';
╵ ~~~~~~~
16:25:18 [vite] error while updating dependencies:
Error: Build failed with 1 error:
node_modules/@needle-tools/engine/lib/engine/physics/workers/mesh-bvh/GenerateMeshBVHWorker.js:2:9: ERROR: No matching export in "external:three-mesh-bvh" for import "MeshBVH"
at failureErrorWithLog (C:\Unity_Projects\NeedleEngineSamples\Library\Needle\Sample\node_modules\esbuild\lib\main.js:1575:15)
at C:\Unity_Projects\NeedleEngineSamples\Library\Needle\Sample\node_modules\esbuild\lib\main.js:1033:28
at runOnEndCallbacks (C:\Unity_Projects\NeedleEngineSamples\Library\Needle\Sample\node_modules\esbuild\lib\main.js:1447:61)
at buildResponseToResult (C:\Unity_Projects\NeedleEngineSamples\Library\Needle\Sample\node_modules\esbuild\lib\main.js:1031:7)
at C:\Unity_Projects\NeedleEngineSamples\Library\Needle\Sample\node_modules\esbuild\lib\main.js:1143:14
at responseCallbacks.<computed> (C:\Unity_Projects\NeedleEngineSamples\Library\Needle\Sample\node_modules\esbuild\lib\main.js:680:9)
at handleIncomingPacket (C:\Unity_Projects\NeedleEngineSamples\Library\Needle\Sample\node_modules\esbuild\lib\main.js:735:9)
at Socket.readFromStdout (C:\Unity_Projects\NeedleEngineSamples\Library\Needle\Sample\node_modules\esbuild\lib\main.js:656:7)
at Socket.emit (node:events:519:28)
at addChunk (node:internal/streams/readable:559:12)
That’s not related to Unity - which Needle Engine version are you using here?
Try restarting your vite server. It’s not related to Unity at all. Your web project is just inside the Unity Library C:\Unity_Projects\NeedleEngineSamples\Library\Needle\Sample
Works after deleting Library folder of Unity and reimporting
You also deleted the whole web project and re-created it. Restarting the webserver alone should have fixed it too
Repro’ed this with another project I upgraded, stop/start of the server didn’t fix it, trying other solutions
I have sent out a repro project as I can’t actually fix the error despite library cleans, clean installs etc, this must be some glitch in 3.47.6 Needle or more recent versions as this project worked fine in older versions of Needle. It only happens when the project is using three-mesh-bvh in that Needle version.
Hi, which framework are you using - is this project using nextjs (webpack) or vite or something else?
It is using Vite
I just ran the project that you sent here but didn’t get the error unfortunately. Maybe it’s worth trying to upgrade vite, your project is using Vite 3.1.4, our default vite web template is currently using 4.3.9
If the error persists let me know.
Trying now, found where to update it
Upgrading Vite fixed it, is there any automated way to update things like Vite version to the latest supported to avoid this in future?
So far we have frozen the vite version to 4.3.9 since later versions on the 4.x cycle all were buggy. I believe recent 5.3+ versions are fine again, so we’ll update at some point.
Basically, we’re defining specific versions in our templates because we can say “this works” – if you update to some (potentially buggy) other vite or dependency version, we cannot really guarantee that.
This topic was automatically closed 13 days after the last reply. New replies are no longer allowed.