Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Bun #445

Open
nachat-ayoub opened this issue Sep 22, 2024 · 5 comments
Open

Support for Bun #445

nachat-ayoub opened this issue Sep 22, 2024 · 5 comments

Comments

@nachat-ayoub
Copy link

nachat-ayoub commented Sep 22, 2024

The library does not work with running it with bun, i get this error:

error: The module 'webgl' was compiled against a different Node.js ABI version using NODE_MODULE_VERSION 108. This version of Bun requires NODE_MODULE_VERSION 127. Please try re-compiling or re-installing the module.

  at bindings (./elysia-app/node_modules/bindings/bindings.js:112:48)
  at ./elysia-app/node_modules/gl/src/javascript/native-gl.js:1:7
  at ./elysia-app/node_modules/gl/src/javascript/webgl-rendering-context.js:4:42
  at ./elysia-app/node_modules/gl/src/javascript/node-index.js:3:32

  at ./elysia-app/node_modules/inkpaint/lib/polyfill/Doc.js:8:15

  at ./elysia-app/node_modules/inkpaint/lib/polyfill/Doc.js:8:15  
  at ./elysia-app/node_modules/inkpaint/lib/renderers/SystemRenderer.js:11:12
  at ./elysia-app/node_modules/inkpaint/lib/renderers/canvas/Ca5
  at ./elysia-app/node_modules/inkpaint/lib/polyfill/Doc.js:8:15  
  at ./elysia-app/node_modules/inkpaint/lib/renderers/SystemRenderer.js:11:12
  at ./elysia-app/node_modules/inkpaint/lib/renderers/canvas/Ca5

  at ./elysia-app/node_modules/inkpaint/lib/polyfill/Doc.js:8:15
  at ./elysia-app/node_modules/inkpaint/lib/renderers/SystemRenderer.js:11:12
  at ./elysia-app/node_modules/inkpaint/lib/renderers/canvas/CanvasRenderer.js:7:23
  at ./elysia-app/node_modules/inkpaint/lib/core.js:318:23
  at ./elysia-app/node_modules/inkpaint/lib/index.js:480:5
  at ./elysia-app/node_modules/ffcreator/lib/node/cons.js:16:20
  at ./elysia-app/node_modules/ffcreator/lib/creator.js:23:7
@drawcall
Copy link
Member

This error occurs because the Node WebGL module you are using is compiled for a different Node.js ABI version, while the current version of Bun you are using requires a different ABI version. try 'npm rebuild gl'

@nachat-ayoub
Copy link
Author

nachat-ayoub commented Sep 24, 2024

@drawcall I did that and still getting the same error. can you try running a ts file that uses the FFCreator package with bun and update me with a solution?

i even tried using this command:

$env:npm_config_target = 'v21.7.3';
> bun install

but got this error:

error: Could not locate the bindings file. Tried:
 → C:\Users\...\elysia-app\node_modules\gl\build\webgl.node
 → C:\Users\...\elysia-app\node_modules\gl\build\Debug\webgl.node
 → C:\Users\...\elysia-app\node_modules\gl\build\Release\webgl.node
 → C:\Users\...\elysia-app\node_modules\gl\out\Debug\webgl.node
 → C:\Users\...\elysia-app\node_modules\gl\Debug\webgl.node
 → C:\Users\...\elysia-app\node_modules\gl\out\Release\webgl.node
 → C:\Users\...\elysia-app\node_modules\gl\Release\webgl.node
 → C:\Users\...\elysia-app\node_modules\gl\build\default\webgl.node
 → C:\Users\...\elysia-app\node_modules\gl\compiled\22.6.0\win32\x64\webgl.node
 → C:\Users\...\elysia-app\node_modules\gl\addon-build\release\install-root\webgl.node
 → C:\Users\...\elysia-app\node_modules\gl\addon-build\debug\install-root\webgl.node
 → C:\Users\...\elysia-app\node_modules\gl\addon-build\default\install-root\webgl.node
 → C:\Users\...\elysia-app\node_modules\gl\lib\binding\node-v127-win32-x64\webgl.node
      at bindings (C:\Users\...\elysia-app\node_modules\bindings\bindings.js:126:9)
      at C:\Users\...\elysia-app\node_modules\gl\src\javascript\native-gl.js:1:7
      at C:\Users\...\elysia-app\node_modules\gl\src\javascript\webgl-rendering-context.js:4:42
      at C:\Users\...\elysia-app\node_modules\gl\src\javascript\node-index.js:3:32
      at C:\Users\...\elysia-app\node_modules\gl\index.js:4:10
      at C:\Users\...\elysia-app\node_modules\inkpaint\lib\canvas-gl.js:120:11
      at C:\Users\...\elysia-app\node_modules\inkpaint\lib\polyfill\Canvas.js:7:5
      at C:\Users\...\elysia-app\node_modules\inkpaint\lib\polyfill\Doc.js:8:15
      at C:\Users\...\elysia-app\node_modules\inkpaint\lib\renderers\SystemRenderer.js:11:12
      at C:\Users\...\elysia-app\node_modules\inkpaint\lib\renderers\canvas\CanvasRenderer.js:7:23
      at C:\Users\...\elysia-app\node_modules\inkpaint\lib\core.js:318:23
      at C:\Users\...\elysia-app\node_modules\inkpaint\lib\index.js:480:5
      at C:\Users\...\elysia-app\node_modules\ffcreator\lib\node\cons.js:16:20
      at C:\Users\...\elysia-app\node_modules\ffcreator\lib\creator.js:23:7
      at C:\Users\...\elysia-app\node_modules\ffcreator\lib\index.js:14:7

Bun v1.1.29 (Windows x64)
Nodejs v21.7.3

@drawcall
Copy link
Member

drawcall commented Oct 3, 2024

Sorry, too busy at work. try again later.

@nachat-ayoub
Copy link
Author

Sorry, too busy at work. try again later.

Thanks for replying, i will wait until Bun team support the nodejs latest version.

@drawcall
Copy link
Member

drawcall commented Oct 3, 2024

or cd node_modules/gl
node-gyp rebuild

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants