 Module = require 'module'
 path = require 'path'
-
-fs = null     # Defer so the cache is used
-semver = null # Defer so the cache is used
+semver = require 'semver'
 
 nativeModules = process.binding('natives')
 

    foundPath

exports.create = (modulePath) ->
  requireDependencies()

  modulePath = fs.realpathSync(modulePath)
  metadataPath = path.join(modulePath, 'package.json')

    pathToCheck and pathToCheck[0] is '/'

loadDependencies = (modulePath, rootPath, rootMetadata, moduleCache) ->
  fs = require 'fs-plus'

  for childPath in fs.listSync(path.join(modulePath, 'node_modules'))
    continue if path.basename(childPath) is '.bin'
    continue if rootPath is modulePath and rootMetadata.packageDependencies?.hasOwnProperty(path.basename(childPath))
