We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.1.38+bf2f153f5
Linux 6.11.5-amd64 x86_64 unknown
Building with a target set to "node" with one of the JS file implicitly importing a .node addon, like for example krb5.
.node
require('../build/Release/krb5');
When building for the bun target, the build is successfull.
bun
The target node should behave the same way.
node
When building and targeting node the following error is emited :
❱ bun ./build.js 140 | format: 'cjs', 141 | target: 'node', 142 | external: [] 143 | }).then((output) => { 144 | if (!output.success) { 145 | throw new Error(`Failed backend bun build :\n${output.logs.join('\n')}`); ^ error: Failed backend bun build : ResolveMessage: Could not resolve: "../build/Release/krb5"
No response
The text was updated successfully, but these errors were encountered:
Would it be possible to provide your build.js file?
Sorry, something went wrong.
Yes but it's actually not required, the trigger is selecting node as a target.
Here is minimal files to reproduce the issue with the build file :
build.js :
const Bun = require('bun'); async function build() { await Bun.build({ entrypoints: ['test.js'], outDir: './bun-build', format: 'cjs', target: 'node', external: [] }).then((output) => { if (!output.success) { throw new Error(`Failed backend bun build :\n${output.logs.join('\n')}`); } else { console.log('Bun backend build successful'); } }); } build();
test.js :
const krb5 = require('krb5');
It happens when running bun build --target node ./test.js as well, with bun build --target bun ./test.js working as expected
bun build --target node ./test.js
bun build --target bun ./test.js
No branches or pull requests
What version of Bun is running?
1.1.38+bf2f153f5
What platform is your computer?
Linux 6.11.5-amd64 x86_64 unknown
What steps can reproduce the bug?
Building with a target set to "node" with one of the JS file implicitly importing a
.node
addon, like for example krb5.What is the expected behavior?
When building for the
bun
target, the build is successfull.The target
node
should behave the same way.What do you see instead?
When building and targeting node the following error is emited :
Additional information
No response
The text was updated successfully, but these errors were encountered: