Closed cage1618 closed 5 months ago
@cage1618 Try adding node_modules\clipboard-sys\dist\bin\win_clipboard.exe
to assets
I was tried,no effect
I add node_modules/clipboard-sys/**/*
to the assets
I think the exe should be moved to local directory before executing it, dunno if you can copy it to a temp dir and specify a custom path to the exe when running the command
like temp dir?
I copy the file to the root dir, still not work
No clue I'm sorry
my soluation:
1.use fs.readFile
and fs.writeFile
copy the binairy file from snapshot filesystem to real filesystem
note: you must have write permission of the target dir on the real filesystem.
What version of pkg are you using?
5.11.5
What version of Node.js are you using?
20.11.1
What operating system are you using?
windows
What CPU architecture are you using?
x86_64
What Node versions, OSs and CPU architectures are you building for?
node20
Describe the Bug
I use clipboard-sys to copy image to cilpboard, on windows, i canuth an error: Command failed with ENOENT: C:\snapshot\buddy\node_modules\clipboard-sys\dist\bin\win_clipboard.exe
Expected Behavior
no error
To Reproduce
const {clipboard} = require('clipboard-sys');
await clipboard.writeImage('C:\User\abc\a.png');