 buildAPI          = require 'bongo-api-builder'
 bongo             = require 'bongo'
 
-KONFIG = JSON.parse process.env.KONFIG_JSON or {}
+try
+  KONFIG = JSON.parse(process.env.KONFIG_JSON)
+catch error
+  console.log "buildclient: Error when trying to parse 'KONFIG_JSON'"
+  return
 
 args =
   watchDuration : argv.watchDuration  or 5000

    minus  = '-'
    bytes *= -1
  thresh    = 1024
  units     = ["kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]
  unitIndex = -1
  return "#{bytes} B"  if bytes < thresh

  getProjects:->

    rp = (address)=>
      "#{ address?.replace(/^website\//, '/') }?#{ args.version }"

    apps = {}
    {projects, bundles} = require './projects'
