Closed TrevorBlythe closed 9 months ago
This usually means that you installed headless-gl under an older Node.js (v18, for example), then updated Node.js to v20. Usually the fix is rebuilding headless-gl with npm, or simply removing and reinstalling headless-gl with npm.
Note: headless-gl does not currently have prebuilt binaries for v20 of Node, so it may take some time to build from source on your machine.
How do I rebuild it from source?
It will happen automatically when you reinstall it with npm.
You can also run npm rebuild gl
Could we have a prebuilt binary for Node 20? 😊 It seems non-trivial to build it either on my dev setup or in my CI. I suppose I'd need to install python 2.7 on both.
Node 16 just EOLed. It's a ripe time for upgrading. I'm sure many people are jumping straight to V20 right about now.
It will happen automatically when you reinstall it with npm.
You can also run
npm rebuild gl
First of all, thank you for replying and I did get it working eventually. I also agree that there should just be a pre built binary since its so easy to compile.
It’s on my list; when I tried to produce a prebuilt build for v20 early on, I ran into CI issues.On 15 Sep 2023, at 19:36, Trevor Blythe @.***> wrote:
It will happen automatically when you reinstall it with npm. You can also run npm rebuild gl
First of all, thank you for replying and I did get it working eventually. I also agree that there should just be a pre built binary since its so easy to compile.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
Hello,
I also met the same problem, and it is also the same error when using "npm rebuild gl". I am using this under electron. Any update for this now? Thanks a lot.
Trying to use require('gl') gives error,
Error: The module 'my project/node_modules/gl/build/Release/webgl.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 108. This version of Node.js requires NODE_MODULE_VERSION 115.
What does this mean?? Please help!
I am using node version 20.3.1 I also tried it on the bun runtime but it failed there too.