       @getPackageNameFromFilePath(filePath)
 
     if options.detail?
-      file = /(\((.+?):\d+|\((.+)\)|(.+))/.exec(options.detail)[1]
-
-      # Stack traces may be a file URI
-      if /file:\/\/(\w*)\/(.*)/.test(file)
-        file = /file:\/\/(\w*)\/(.*)/.exec(file)[2]
-
-      packageName = getPackageName(file)
+      packageName = getPackageName(options.detail)
       return packageName if packageName?
 
     if options.stack?

        packagePaths[packageName] = fs.realpathSync(packagePath)

    getPackageName = (filePath) =>
      if path.isAbsolute(filePath)
        for packName, packagePath of packagePaths
          continue if filePath is 'node.js'


        # Empty when it was run from the dev console
        return unless file
        packageName = getPackageName(file)
        return packageName if packageName?

