i'm using PKG to build a program using package.json. I included the "pkg" property in package.json but pkg always returns Error! Property 'bin' does not exist in [path to package.json]
when i add the bin property it asks for the directory for the path to bin, i tried giving it the path the .bin folder in node_modules (which does make the error go away), however the generated executable just crashes immidiatley with no error. I havent found this error anywhere else.
Setting the property "bin" to "./main.js" (the program's entrypoint) seems to have fixed the problem. package.json:
{
"name": "project-name",
"version": "1.0.0",
"description": "",
"main": "./main.js",
"bin": "./main.js",
"scripts": {
"start": "node ."
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With