mikaelbr/gulp-notify

Error on install

Closed this issue · 3 comments

By typing: npm install --save-dev gulp-notify
I get this:
npm ERR! Darwin 14.1.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "--save-dev" "gulp-notify"
npm ERR! node v0.10.35
npm ERR! npm v2.2.0
npm ERR! file /Users/name/Desktop/kwdev/package.json
npm ERR! code EJSONPARSE

npm ERR! Failed to parse json
npm ERR! Unexpected token }
npm ERR! File: /Users/name/Desktop/kwdev/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

npm ERR! Please include the following file with any support request:
npm ERR! /Users/name/Desktop/kwdev/npm-debug.log

NPM-DEBUG.LOG:
0 info it worked if it ends with ok
1 verbose cli [ 'node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli '--save-dev',
1 verbose cli 'gulp-notify' ]
2 info using npm@2.2.0
3 info using node@v0.10.35
4 verbose stack Error: Failed to parse json
4 verbose stack Unexpected token }
4 verbose stack at parseError (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:378:25)
4 verbose stack at parseJson (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:85:51)
4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:59:33
4 verbose stack at evalmachine.:272:14
4 verbose stack at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:102:5
4 verbose stack at Object.oncomplete (evalmachine.:108:15)
5 verbose cwd /Users/name/Desktop/kwdev
6 error Darwin 14.1.0
7 error argv "node" "/usr/local/bin/npm" "install" "--save-dev" "gulp-notify"
8 error node v0.10.35
9 error npm v2.2.0
10 error file /Users/name/Desktop/kwdev/package.json
11 error code EJSONPARSE
12 error Failed to parse json
12 error Unexpected token }
13 error File: /Users/name/Desktop/kwdev/package.json
14 error Failed to parse package.json data.
14 error package.json must be actual JSON, not just JavaScript.
14 error
14 error This is not a bug in npm.
14 error Tell the package author to fix their package.json file. JSON.parse
15 verbose exit [ 1, true ]

Hi! To me it looks like you have an syntax error in your package.json file. This typically happens if you have a leading comma where it shouldn't be a leading comma. So when --save-dev tries to add gulp-notify to your package.json, it breaks.

Thanks so much for you time, those little buggars always seem to trip me up.

Happy Coding!

On Jan 31, 2015, at 9:05 AM, Mikael Brevik notifications@github.com wrote:

Hi! To me it looks like you have an syntax error in your package.json file. This typically happens if you have a leading comma where it shouldn't be a leading comma. So when --save-dev tries to add gulp-notify to your package.json, it breaks.


Reply to this email directly or view it on GitHub #67 (comment).

No worries! Happy to help.