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 #104

Closed rogers1lt closed 8 years ago

rogers1lt commented 8 years ago

This is similar to a previous issue, but I am using Windows 10 and I'm very much a noob; I have only started using Haskell for a month and have only been using Atom in any meaningful for about two weeks. I have previously just been using Notepad++

1) Haskell has been originally installed into "C:\Haskell Platform\7.10.3\

2) I first experienced the error after installing all of the packages listed below

3) I attempted to follow the instructions in the previous post, both in the original Haskell installation, and then later into a new directory (C:\Haskell\cs558) for the purpose of installing Stack as suggested. This has completely muddied up everything and I'm tempted to purge everything and I don't know where to start.

Atom Version: 1.4.2

Packages installed

autocomplete-haskell haskell-ghc-mod Additional Path Directories: C:\Haskell\cs558\ghc-mod\bin\ghc-mod\, C:\Haskell\cs558\, C:\Haskell\cs558\ghc-mod\cabal-helper-0.6.3.1-ClrY8w4Rmp0IUCPKyX7xPt\

Ghc Mod Path:C:\Haskell\cs558\ghc-mod\bin\ghc-mod\

ide-haskell

ide-haskell-cabal Active GHC version: 7.10 Build directory for 7.10: c:\Haskell\cs558\dist\2672c1f3\build\ Path for GHC 7.10 : c:\Haskell Platform\7.10.3\bin\ Sandbox configuration for GHC 7.10: c:\Haskell\cs558\ghc-mod\bin\ghc-mod\

language-haskell

Error/Path

Error: spawn C:\Haskell\cs558\ghc-mod\bin\ghc-mod\ ENOENT PATH: C:\Users\Andrew\AppData\Roaming\local\bin;C:\Program Files\Haskell\bin;C:\Haskell Platform\7.10.3\lib\extralibs\bin;C:\Haskell Platform\7.10.3\bin;C:\Python35-32\Scripts\;C:\Python35-32\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Haskell Platform\7.10.3\mingw\bin;C:\Users\Andrew\AppData\Roaming\local\bin;C:\Users\Andrew\AppData\Roaming\cabal\bin;C:\Users\Andrew\AppData\Local\atom\bin path: C:\Users\Andrew\AppData\Roaming\local\bin;C:\Program Files\Haskell\bin;C:\Haskell Platform\7.10.3\lib\extralibs\bin;C:\Haskell Platform\7.10.3\bin;C:\Python35-32\Scripts\;C:\Python35-32\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Haskell Platform\7.10.3\mingw\bin;C:\Users\Andrew\AppData\Roaming\local\bin;C:\Users\Andrew\AppData\Roaming\cabal\bin;C:\Users\Andrew\AppData\Local\atom\bin Path: C:\Users\Andrew\AppData\Roaming\local\bin;C:\Program Files\Haskell\bin;C:\Haskell Platform\7.10.3\lib\extralibs\bin;C:\Haskell Platform\7.10.3\bin;C:\Python35-32\Scripts\;C:\Python35-32\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Haskell Platform\7.10.3\mingw\bin;C:\Users\Andrew\AppData\Roaming\local\bin;C:\Users\Andrew\AppData\Roaming\cabal\bin;C:\Users\Andrew\AppData\Local\atom\bin

Stack Trace

Error at file:///C:/Users/Andrew/.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)

atorstling commented 8 years ago

Install ghc-mod. On debian linux, "apt-get install ghc-mod" worked for me.

lierdakil commented 8 years ago

spawn C:\Haskell\cs558\ghc-mod\bin\ghc-mod\ ENOENT you have an extra backslash there.

Dattaya commented 8 years ago

This is what solved this issue for me on Windows:

> cabal update
> cabal install ghc-mod

By default cabal installs packages into C:\Users\UserName\AppData\Roaming\cabal\packages\

rogers1lt commented 8 years ago

That was it, changing the extra backslash and reinstalling cabal seemed to fix it!

Shahala1 commented 8 years ago

I have the same issue as OP, wasn't able to solve it by the suggested steps. 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

It seems it has something do with Admin rights since when I launch the program with Admin rights it loads perfectly.

[Enter steps to reproduce below:]

  1. ...
  2. ...

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\
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\
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\

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