atom-haskell-archive / haskell-ghc-mod

haskell-ghc-mod atom package
https://atom.io/packages/haskell-ghc-mod
MIT License
69 stars 20 forks source link

Haskell-ghc-mod: ghc-mod failed to launch. It is probably missing or misconfigured. ENOENT #134

Closed Shahala1 closed 8 years ago

Shahala1 commented 8 years ago

Hello,

I have the same issue as #104. Tried using the suggested solutions to no avail. What I've tried:

  1. Installing ghc-mod via Cabal as suggested by Dattaya
  2. Changing both "ghc-mod path" and "additional paths" in the ghc-mod package settings. Added the following: C:\Users\MyUser\AppData\Roaming\cabal\bin, C:\Users\MyUser\AppData\Roaming\cabal\packages\hackage.haskell.org\ghc-mod and a few more

Seems to be some Admin issues since when I launch the Atom as Admin the issue is gone.

Atom Version: 1.6.2 System: Microsoft Windows 8.1 Pro Thrown From: haskell-ghc-mod package, v1.12.0

Stack Trace

Haskell-ghc-mod: ghc-mod failed to launch. It is probably missing or misconfigured. ENOENT

At Error: spawn C:\Users\Adam\AppData\Roaming\cabal\bin ENOENT
PATH: C:\Program Files\Haskell\bin;d:\Program Files\Haskell Platform\7.10.3\lib\extralibs\bin;d:\Program Files\Haskell Platform\7.10.3\bin;C:\Program Files\NVIDIA Corporation\PhysX\Common;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\MiKTeX 2.9\miktex\bin\;C:\Program Files\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files\Intel\OpenCL SDK\2.0\bin\x86;C:\Users\Adam\appdata\local\android\android-sdk\platform-tools;d:\Program Files\Haskell Platform\7.10.3\mingw\bin;D:\program files\Leksah\bin\;C:\Users\Adam\AppData\Local\Programs\Python\Python35-32\Scripts\;C:\Users\Adam\AppData\Local\Programs\Python\Python35-32\;C:\Users\Adam\AppData\Local\atom\bin
path: C:\Program Files\Haskell\bin;d:\Program Files\Haskell Platform\7.10.3\lib\extralibs\bin;d:\Program Files\Haskell Platform\7.10.3\bin;C:\Program Files\NVIDIA Corporation\PhysX\Common;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\MiKTeX 2.9\miktex\bin\;C:\Program Files\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files\Intel\OpenCL SDK\2.0\bin\x86;C:\Users\Adam\appdata\local\android\android-sdk\platform-tools;d:\Program Files\Haskell Platform\7.10.3\mingw\bin;D:\program files\Leksah\bin\;C:\Users\Adam\AppData\Local\Programs\Python\Python35-32\Scripts\;C:\Users\Adam\AppData\Local\Programs\Python\Python35-32\;C:\Users\Adam\AppData\Local\atom\bin
Path: C:\Program Files\Haskell\bin;d:\Program Files\Haskell Platform\7.10.3\lib\extralibs\bin;d:\Program Files\Haskell Platform\7.10.3\bin;C:\Program Files\NVIDIA Corporation\PhysX\Common;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\MiKTeX 2.9\miktex\bin\;C:\Program Files\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files\Intel\OpenCL SDK\2.0\bin\x86;C:\Users\Adam\appdata\local\android\android-sdk\platform-tools;d:\Program Files\Haskell Platform\7.10.3\mingw\bin;D:\program files\Leksah\bin\;C:\Users\Adam\AppData\Local\Programs\Python\Python35-32\Scripts\;C:\Users\Adam\AppData\Local\Programs\Python\Python35-32\;C:\Users\Adam\AppData\Local\atom\bin

Error
    at file:///C:/Users/Adam/.atom/packages/haskell-ghc-mod/lib/ghc-mod/ghc-modi-process.coffee:60:28
    at exithandler (child_process.js:222:5)
    at ChildProcess.errorhandler (child_process.js:229:5)
    at emitOne (events.js:77:13)
    at ChildProcess.emit (events.js:169:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
    at onErrorNT (internal/child_process.js:344:16)
    at doNTCallback2 (node.js:441:9)
    at process._tickCallback (node.js:355:17)

Commands

Config

{
  "core": {
    "closeEmptyWindows": false
  },
  "haskell-ghc-mod": {
    "additionalPathDirectories": [
      "C:\\Users\\Adam\\AppData\\Roaming\\cabal\\bin; C:\\Users\\Adam\\AppData\\Roaming\\cabal\\packages; C:\\Users\\Adam\\AppData\\Roaming\\cabal\\packages\\hackage.haskell.org; C:\\Users\\Adam\\AppData\\Roaming\\cabal\\packages\\hackage.haskell.org\\ghc-mod; C:\\Users\\Adam\\AppData\\Roaming\\cabal\\packages\\hackage.haskell.org\\ghc-mod\\5.5.0.0; C:\\Users\\Tablet\\AppData\\Roaming\\cabal\\bin; C:\\Users\\Tablet\\AppData\\Roaming\\cabal\\packages; C:\\Users\\Tablet\\AppData\\Roaming\\cabal\\packages\\hackage.haskell.org; C:\\Users\\Tablet\\AppData\\Roaming\\cabal\\packages\\hackage.haskell.org\\ghc-mod; C:\\Users\\Tablet\\AppData\\Roaming\\cabal\\packages\\hackage.haskell.org\\ghc-mod\\5.5.0.0"
    ],
    "ghcModPath": "C:\\Users\\Adam\\AppData\\Roaming\\cabal\\bin"
  }
}

Installed Packages

# User
autocomplete-haskell, v0.6.5
haskell-ghc-mod, v1.12.0
ide-haskell, v1.6.0
ide-haskell-cabal, v1.2.0
language-haskell, v1.7.10

# Dev
No dev packages
lierdakil commented 8 years ago

"ghcModPath": "C:\\Users\\Adam\\AppData\\Roaming\\cabal\\bin" should be "ghcModPath": "C:\\Users\\Adam\\AppData\\Roaming\\cabal\\bin\\ghc-mod.exe" or something. Or you can leave it as default. Readme explicitly states that this is path to executable itself, not a directory.

Shahala1 commented 8 years ago

I missed that bit in the Readme. Issue is now solved. Thank you for the patience.

lierdakil commented 8 years ago

@MauritiusKlein did you install ghc-mod? Did you accidentally put directory path instead of executable path into 'Ghc Mod Path'? Is your environment setup correctly? If on OSX, try running Atom from terminal. It's all in the readme, either this one or ide-haskell's (sorry about that). Well, some parts are on wiki, but those are linked from readme. Seriously.

lierdakil commented 8 years ago

Please read https://github.com/atom-haskell/ide-haskell#requirements