gltfjsx
gltfjsx copied to clipboard
Cannot find module 'gl-matrix/vec3'
I've succesfully used gltfjsx in the past but suddenly today when I ran npx gltfjsx filename.glb I got the following error in my console:
Cannot find module 'gl-matrix/vec3'
- /Users/xxx/.npm/_npx/24391/lib/node_modules/gltfjsx/node_modules/@gltf-transform/core/dist/core.js
- /Users/xxx/.npm/_npx/24391/lib/node_modules/gltfjsx/src/utils/transform.js
- /Users/xxx/.npm/_npx/24391/lib/node_modules/gltfjsx/src/gltfjsx.js
- /Users/xxx/.npm/_npx/24391/lib/node_modules/gltfjsx/src/components/App.js
- /Users/xxx/.npm/_npx/24391/lib/node_modules/gltfjsx/node_modules/import-jsx/index.js
- /Users/xxx/.npm/_npx/24391/lib/node_modules/gltfjsx/cli.js
The package gl-matrix released a new version (3.4.0) which brakes this package (see https://github.com/toji/gl-matrix/issues/439). I assume they will fix it soon.
In the maintime you can add this to your package.json to continue.
"resolutions": {
"gl-matrix": "3.3.0"
}
I've pushed a new release of @gltf-transform/core pinned to gl-matrix@~3.3.0, which should resolve things for gltfjsx as well. See: https://github.com/donmccurdy/glTF-Transform/pull/378.
thanks @donmccurdy ! i updated and published
I can confirm things are working again. @drcmda @donmccurdy thnx for the quick response and quick fix guys! I love using this package.