#Use sharp with Bun compilation
1 messages · Page 1 of 1 (latest)
Installation
bun init bun install --cpu=x64 --os=linux --libc=glibc sharp
When using compilation, ie, bun build --compile ./index.ts --outfile ~/Desktop/bin-test I'm running into the error I mentioned. Including if I install sharp using the command line arguments you suggested.
Yeah!! Can't find sharp
Hey, did someone found a solution?
The problems are this paths that are imported, but it must be imported directly.
const paths = [
`../src/build/Release/sharp-${runtimePlatform}.node`,
'../src/build/Release/sharp-wasm32.node',
`@img/sharp-${runtimePlatform}/sharp.node`,
'@img/sharp-wasm32/sharp.node'
];
The second problem are the .dll files, that have to be in the same directory