gltfjsx icon indicating copy to clipboard operation
gltfjsx copied to clipboard

Cannot find module 'gl-matrix/vec3'

Open jona91git opened this issue 4 years ago • 4 comments

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

jona91git avatar Oct 05 '21 14:10 jona91git

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"
 }

DannyvanderJagt avatar Oct 05 '21 15:10 DannyvanderJagt

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.

donmccurdy avatar Oct 05 '21 17:10 donmccurdy

thanks @donmccurdy ! i updated and published

drcmda avatar Oct 05 '21 21:10 drcmda

I can confirm things are working again. @drcmda @donmccurdy thnx for the quick response and quick fix guys! I love using this package.

jona91git avatar Oct 06 '21 12:10 jona91git