       return source
 
     if 'string' is typeof arg
+      unless hinoki.isNodejs
+        throw new Error 'string sources only work on Node.js because they need the filesystem module to be present'
       return hinoki.source hinoki.requireSource arg
 
     if 'object' is typeof arg


    # TODO call this something like fromExports
    hinoki.baseRequireSource = (filepath, object) ->
      stat = fs.statSync(filepath)
      if stat.isFile()
        extension = pathModule.extname(filepath)


      path,
      cacheTarget
    ).promise

  hinoki.isNodejs = fsModule?.statSync? and fsModule?.readdirSync?

  # monomorphic
  hinoki.PromiseAndCacheTarget = (promise, cacheTarget) ->
