Skip to content

SyntaxError: Unexpected non-whitespace character after JSON at position 117 (line 1 column 118) #132

@Janice97

Description

@Janice97
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions