dominictarr / JSONStream

rawStream.pipe(JSONStream.parse()).pipe(streamOfObjects)
Other
1.92k stars 165 forks source link

Remove trailing comma, to fix JSON parsing. #110

Closed adamgaynor closed 7 years ago

adamgaynor commented 7 years ago

NPM fails to parse this JSON file when running npm install.

dominictarr commented 7 years ago

what npm version is this? that is actuall couchdb output that has been in this repo forever this is a bug in npm

dominictarr commented 7 years ago

what npm version? I am unable to reproduce this with either npm 3.8 or 4.0.2

adamgaynor commented 7 years ago

I had an issue running NPM 1.3.10, with node 0.10.25.

Everything worked fine until a few days ago, when NPM started throwing npm ERR! registry error parsing json, so this may not be the actual cause of the error.

I realize this is an older version of NPM, but figure that fixing a syntax error is never a bad thing.

dominictarr commented 7 years ago

I'm doubtful that this file is the cause of your error. Npm shouldn't even parse that file while installing. using nvm, I tried node 0.10.25, with npm 1.3.24 and installed this fine, same with node 0.10.48 and npm 2.15.1

My bet is that what you are getting is either the registry giving an invalid response (or something breaking it) or your cache.

adamgaynor commented 7 years ago

It does look like that was the case, with the registry giving an invalid response. Updating node and npm also fixed the issue, thank you for the suggestion!