Syntax Error: Unexpected token R
Closed this issue · 2 comments
cawoodm commented
C:\>npm-windows-upgrade
npm-windows-upgrade v3.1.0
undefined:1
Run `auto` to initialize
^
SyntaxError: Unexpected token R
at Object.parse (native)
at C:\Users\xxx\AppData\Roaming\npm\node_modules\npm-windows-upgrade\lib\
versions.js:39:20
at ChildProcess.exithandler (child_process.js:204:7)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:827:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at Pipe._onclose (net.js:471:12)
cawoodm commented
The pertinent line in versions.js is:
exec('npm view npm versions --json', function (err, stdout) {
and npm view npm versions --json
returns:
C:\temp>npm view npm versions --json
[
"1.1.25",
"1.1.70",
"1.1.71",
"1.2.19",
"1.2.20",
"1.2.21",
"1.2.22",
"1.2.23",
"1.2.24",
"1.2.25",
"1.2.27",
"1.2.28",
"1.2.30",
"1.2.31",
"1.2.32",
"1.2.8000",
"1.3.0",
... all the way to
"3.10.9"
]
cawoodm commented
OK, it seems I had an AutoRun command (HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun) which was executed every time a new command was entered. It output a message beginning with "R".