nypublicradio / audiogram

Turn audio into a shareable video.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error with "npm run postinstall && bin/server"

scifri opened this issue · comments

I have a similar issue to Issue #72. I did a new reinstall and copied and pasted my settings folder into the new updated repo. When I use the 'npm start' command, it doesn't launch and gives me this:

audiogram@0.9.5 start /Users/danielpeterschmidt/Desktop/audiogram
npm run postinstall && bin/server

audiogram@0.9.5 postinstall /Users/danielpeterschmidt/Desktop/audiogram
mkdir -p editor/js && browserify client/index.js > editor/js/bundle.js

Error parsing settings/themes.json.
/Users/danielpeterschmidt/Desktop/audiogram/lib/settings/load.js:18
throw e;
^

SyntaxError: /Users/danielpeterschmidt/Desktop/audiogram/settings/themes.json: Unexpected token } in JSON at position 611
at Object.parse (native)
at Object.Module._extensions..json (module.js:558:27)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at module.exports (/Users/danielpeterschmidt/Desktop/audiogram/lib/settings/load.js:9:14)
at Object. (/Users/danielpeterschmidt/Desktop/audiogram/lib/settings/index.js:7:14)
at Module._compile (module.js:541:32)

npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/Cellar/node/6.3.1/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.3.1
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! audiogram@0.9.5 start: npm run postinstall && bin/server
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the audiogram@0.9.5 start script 'npm run postinstall && bin/server'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the audiogram package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run postinstall && bin/server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs audiogram
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls audiogram
npm ERR! There is likely additional logging output above.

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

I have tried your suggestions in Issue #72, as well as updated, brew, npm, node, and xcode and haven't had any success, gives me the same message. I'm on Mac OS 10.12.1.

I've also attached my index.js and themes.json files.

themes-index.zip

Thanks for your help!

I think this error comes from a small syntax error in your themes.json file, specifically an extra trailing comma in the SciFri Orange Center section.

Current:

"SciFri Orange Center": {
  "backgroundImage": "orange.png",
  "foregroundColor": "#fbfbfb",
}

Desired:

"SciFri Orange Center": {
  "backgroundImage": "orange.png",
  "foregroundColor": "#fbfbfb"
}

Hah, that did it. Missed that, thanks.