sdk
sdk copied to clipboard
stream-deck create throws error on "Building the project" step
Here's the full output:
D:\Programming>stream-deck create
[stream-deck] @stream-deck-for-node/cli
? Template JavaScript
? Plugin UUID nl.tyrope.streamdecktest
? Name TestProject
? Description This is a test
? Author Tyrope
? Category Custom
√ Boilerplate generated
√ Node modules installed
- Building the project...node:internal/errors:863
const err = new Error(message);
^
Error: Command failed: npm run build
at ChildProcess.exithandler (node:child_process:412:12)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1091:16)
at ChildProcess._handle.onexit (node:internal/child_process:302:5) {
code: 2,
killed: false,
signal: null,
cmd: 'npm run build',
stdout: '\n' +
'> [email protected] build\n' +
'> npx pkg package.json --compress GZip -o plugin/nl.tyrope.streamdecktest.exe\n' +
'\n' +
'> [email protected]\n' +
'compression: GZip\n' +
"> Error! Property 'bin' does not exist in\n" +
' D:\\Programming\\nl.tyrope.streamdecktest\\package.json\n',
stderr: ''
}
Node.js v18.12.1
Here's the entire contents of the JSON file references in the error:
{
"private": true,
"name": "nl.tyrope.streamdecktest",
"version": "1.0.0",
"author": "Tyrope",
"main": "./src/index.js",
"scripts": {
"start": "node ./src/index.js -debug nl.tyrope.streamdecktest",
"build": "npx pkg package.json --compress GZip -o plugin/nl.tyrope.streamdecktest.exe"
},
"pkg": {
"targets": [
"node16-windows-x64"
]
},
"dependencies": {
"@stream-deck-for-node/sdk": "^1.0.14"
}
}
The cli boilerplate for building with JS is missing the bin entry in it's package.json. You can fix it by adding
"bin": "./src/index.js",