Open PrinOrange opened 1 week ago
When I've accounted this issue, I've generally had to go into node_modules/gl and run npm install --build-from-source
.
This is related to V8 API support. The reason you see that issue is that you have an older version of Node.js installed, which is different than the version that Bun pretends to be for V8 modules (currently 22.6.0), so the native module got compiled for an old version of Node.js and Bun won't be compatible with it.
This needs to be fixed, probably somewhere in bun install
so that it builds against the correct version of Node.js. You can try to work around the issue by installing dependencies with the environment variable npm_config_target=v22.6.0
set (this tells node-gyp which version of Node.js to compile for):
$env:npm_config_target = 'v22.6.0';
bun install
However, if you do that you'll probably just run into a different issue because Bun still doesn't support very much of the V8 API. You can track support in issue #4290.
What version of Bun is running?
1.1.30
What platform is your computer?
Microsoft Windows NT 10.0.19045.0 x64
What steps can reproduce the bug?
First, install the GPU.JS
And run this sample code
Then the program crashed.
What is the expected behavior?
It should do utmost compatible for running program like what node.js does. The above code works in node.js, but crashes in bun
What do you see instead?
It throws such error information,
Additional information
No response