gl-matrix: Please revert version to 3.3.0 as 3.4.0 breaks things
Hi! please help revert version to 3.3.0 or bump version to 4.0.0 as many modules depending on gl-matrix is using ‘^’. 3.4.0 results build errors. Great appreciated!

About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 21
- Comments: 36 (11 by maintainers)
Yup. This must be resolved as a lot of packages are dependent on that. Mostly react-map-gl, deck.gl, nebula.gl etc.
But for the quick and temp fix, yarn resolutions can help by adding following in the package.json file.
No problem Brandon.
I tried with the version 3.4.1, but while building the react app with @math.gl as a dependency. I still get the same error i was getting with 3.4.0.
@math.gl is importing the vec2 module as follows, but I guess we can’t import it like this in v3.4.1:
Instead, it has to be imported like this as per new version:
So i guess, version 3.4.1 still doesn’t fix the problem.
Came here to post the same, can confirm it works until an official fix
Hallelujah! Thank you for taking the time to help me set that right, it’s been invaluable.
And now that I know what went wrong I can push out fixes more confidently in the future. Again, though, it may be best if I leave any big changes to a potential 4.0.0 just to avoid this whole song and dance.
Hi,
Yeah. There is another package which might help you with resolutions. I haven’t tried it though, so can’t guarantee.
https://www.npmjs.com/package/npm-force-resolutions
Thanks guys @toji @stefnotch @donmccurdy 🚀
I can confirm v3.4.3 works perfectly fine just like 3.3.0
P.S. These last few comments gave me an idea on how to publish a package without that dist folder. So yeah thanks for that. 😄
I’ll unpublish 3.4.0 for now. It looks like the top-of-tree has made changes (see https://github.com/toji/gl-matrix/pull/432#issuecomment-853225900) that simply aren’t going to be backwards compatible with every build system so I’ll need to do a major version bump if we’re going to publish any new updates. Might not be a bad time to see if there’s any other cleanups that need to be done while I’m at it.
Oh dearie, I’m very sorry for not properly documenting everything. If I recall correctly, I was publishing the package by doing
I’m not entirely sure why I had to
cdinto thedistdirectory for everything to work.It’s also quite possible that one of the build system changes that I merged in was backwards incompatible.
Well crap. Turns out that the previous npm packages were being published FROM the dist folder, whereas I was publishing from the root.
…sigh
v3.4.3 has been published now (sure, let’s just burn through ALL the 3.4.x’s why don’t we.) Let’s give that a try.
(I apologize that this has been so much back and forth. I include gl-matrix in my own projects as a ES module and so the depenencies work out differently.)
@bilalajanjua thx man, you’re my saviour. 😃
Is there any solution I can use without using yarn?
Oh, I may have misunderstood something fairly fundamental about how @stefnotch was previously publishing the package. Let me verify something…
Sure @toji, On it.
Can confirm that
3.4.1did not solve the issue for me either.NPM won’t let me unpublish 3.4.0 since apparently there’s already some dependencies on it 😮 so I’ve marked it as deprecated instead. It’s not clear to me that will resolve the issue with people who have a dependency on
^3.3.0, though, so I’m looking into publishing a new version using an older commit in the repo before the backward compat breaking changes were introduced.If anyone happens to be able to confirm that the deprecation DID fix the problem for you, though, I’d appreciate hearing it!