I use pkg from npm, to make my node file executable for windows. When copying/pasting the executable to the VM it works fine, but when uploading in the drive and downloading it from there in my VM, the executable is not running.
This is the command I am running:
pkg setup.js --targets node16-win-x64
The code I am compiling is:
const main = async () => {
for (let i = 0; i < 10; i++) {
console.log(i);
await new Promise(resolve => setTimeout(resolve, 1000));
}
}
main();
It's not that it shows any errors on windows like "file not secure" or something like that, I double-click it, and the loading icon shows, but no terminal shows up like usual. Any ideas? Thanks.