diff --git a/hspec-core/src/Test/Hspec/Core/Formatters.hs b/hspec-core/src/Test/Hspec/Core/Formatters.hs
--- a/hspec-core/src/Test/Hspec/Core/Formatters.hs
+++ b/hspec-core/src/Test/Hspec/Core/Formatters.hs
@@ -191,10 +191,13 @@
           writeLine ("       " ++ x)
       where
         err = either (("uncaught exception: " ++) . formatException) id reason
-        formatLoc (Location file line _column accuracy) = "  " ++ file ++ ":" ++ show line ++ ":" ++ bestEffortMarking
+        formatLoc (Location file line _column accuracy) = "  " ++ file ++ ":" ++ show line ++ ":" ++ message
           where
-            bestEffortMarking = case accuracy of
-              ExactLocation -> ""
+            message = case accuracy of
+              ExactLocation -> " " -- NOTE: Vim's default 'errorformat'
+                                   -- requires a non-empty message.  This is
+                                   -- why we use a single space as message
+                                   -- here.
               BestEffort -> " (best-effort)"
 
 defaultFooter :: FormatM ()
diff --git a/hspec-core/src/Test/Hspec/Core/Tree.hs b/hspec-core/src/Test/Hspec/Core/Tree.hs
--- a/hspec-core/src/Test/Hspec/Core/Tree.hs
+++ b/hspec-core/src/Test/Hspec/Core/Tree.hs
@@ -17,7 +17,9 @@
 ) where
 
 #ifdef HAS_SOURCE_LOCATIONS
+# if !MIN_VERSION_base(4,9,0)
 import           GHC.SrcLoc
+# endif
 import           GHC.Stack
 #endif
 
diff --git a/hspec-core/src/Test/Hspec/FailureReport.hs b/hspec-core/src/Test/Hspec/FailureReport.hs
--- a/hspec-core/src/Test/Hspec/FailureReport.hs
+++ b/hspec-core/src/Test/Hspec/FailureReport.hs
@@ -1,13 +1,17 @@
+{-# LANGUAGE CPP #-}
 module Test.Hspec.FailureReport (
   FailureReport (..)
 , writeFailureReport
 , readFailureReport
 ) where
 
-import           System.IO
+#ifndef __GHCJS__
 import           System.SetEnv
+import           Test.Hspec.Core.Util (safeTry)
+#endif
+import           System.IO
 import           Test.Hspec.Compat
-import           Test.Hspec.Core.Util (Path, safeTry)
+import           Test.Hspec.Core.Util (Path)
 
 data FailureReport = FailureReport {
   failureReportSeed :: Integer
@@ -18,6 +22,14 @@
 } deriving (Eq, Show, Read)
 
 writeFailureReport :: FailureReport -> IO ()
+#ifdef __GHCJS__
+writeFailureReport _ = return ()
+  -- ghcjs currently does not support setting environment variables
+  -- (https://github.com/ghcjs/ghcjs/issues/263). Since writing a failure report
+  -- into the environment is a non-essential feature we just disable this to be
+  -- able to run hspec test-suites with ghcjs at all. Should be reverted once
+  -- the issue is fixed.
+#else
 writeFailureReport x = do
   -- on Windows this can throw an exception when the input is too large, hence
   -- we use `safeTry` here
@@ -25,6 +37,7 @@
   where
     onError err = do
       hPutStrLn stderr ("WARNING: Could not write environment variable HSPEC_FAILURES (" ++ show err ++ ")")
+#endif
 
 readFailureReport :: IO (Maybe FailureReport)
 readFailureReport = do
diff --git a/hspec-meta.cabal b/hspec-meta.cabal
--- a/hspec-meta.cabal
+++ b/hspec-meta.cabal
@@ -1,5 +1,5 @@
 name:             hspec-meta
-version:          2.2.0
+version:          2.2.1
 license:          MIT
 license-file:     LICENSE
 copyright:        (c) 2011-2015 Simon Hengel,
