rlidwka / yapm

yapm is a package manager for node.js (npm fork)
Other
77 stars 12 forks source link

show parsing errors when invalid json exists #11

Closed rlidwka closed 10 years ago

rlidwka commented 10 years ago

This is not helpful:

alex@elu:/tmp$ cp /etc/passwd package.json
alex@elu:/tmp$ npm install
npm ERR! install Couldn't read dependencies
npm ERR! Failed to parse json
npm ERR! Unexpected token r
npm ERR! File: /tmp/package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR! 
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse
rlidwka commented 10 years ago

docs: https://github.com/rlidwka/yapm/blob/master/changes/json-errors.md upstream pull request: npm/npm#4373