await regedit.list([key]).catch((error) => {
throw new Error('regedit error')
})
//error: SyntaxError: Unexpected non-whitespace character after JSON at position 117 (line 1 column 118)
Based on your source code, I conducted a troubleshooting. When the line result = JSON.parse(stdout) is executed, system logs are mixed into stdout, causing a JSON parsing error