gkjohnson / three-mesh-bvh

A BVH implementation to speed up raycasting and enable spatial queries against three.js meshes.
https://gkjohnson.github.io/three-mesh-bvh/example/bundle/raycast.html
MIT License
2.56k stars 268 forks source link

Cannot find module: './utils/TriangleUtilities.js'. #363

Closed Kevin-Hamilton closed 3 years ago

Kevin-Hamilton commented 3 years ago

When building a project that has three-mesh-bvh as a dependency, I'm suddenly getting the error:

./node_modules/three-mesh-bvh/src/index.js
Cannot find module: './utils/TriangleUtilities.js'. Make sure this package is installed.

comparing version 0.5.1 to 0.5.0 at unpkg, I see the src/utils folder got renamed in this version to src/Utils (with an uppercase "U"): https://unpkg.com/browse/three-mesh-bvh@0.5.1/src/. I believe this is the cause of the issue.

gkjohnson commented 3 years ago

Hey Kevin -- thanks for the report and finding the source of the issue. Looks like the folder name was somehow reverted out from under me during development and I never saw it because windows doesn't respect folder case.

I just published v0.5.2 that fixes the folder name. Do you mind giving that a try? It looked like it worked from unpkg for me.

Kevin-Hamilton commented 3 years ago

Wow, thanks for the speedy fix! That did correct the issue for me.

gkjohnson commented 3 years ago

Great! Thanks again for the report.