Closed benjamin-rood closed 8 years ago
Please see https://github.com/atom-haskell/ide-haskell#requirements and also maybe https://github.com/atom-haskell/haskell-ghc-mod#configuration, which expands on some options a bit.
Hi @lierdakil, I've checked your links, but the didn't help me to solve the problem. Could I provide any extra information to help resolve the issue?
Atom couldn't find ghc-mod executable. Is it installed? Where? Is that directory in PATH? Does Atom get correct PATH from environment? Do you need to specify full path to ghc-mod executable in package settings? Find answers to these questions and you'll probably solve ENOENT error. Now that doesn't mean there are no other problems, but I can't help with those if I don't know about them.
Is it installed? Yes Where? ~/.cabal/bin Is that directory in PATH? Yes Does Atom get correct PATH from environment? Yes Do you need to specify full path to ghc-mod executable in package settings? I don't know, but I've tried and that hasn't fixed the problem
I don't see /Users/br/.cabal/bin
in PATH that Atom reports (from initial bug report):
PATH: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/TeX/texbin:/Users/br/gopath/bin:/usr/local/bin:/Users/br/scripts
So your answer to either third or fourth question is incorrect.
Try putting /Users/br/.cabal/bin/ghc-mod
into 'Ghc Mod Path` setting.
I've tried even that, but still no effect.
@stremlenye, I just noticed you're not OP. Atom should create an error report. You can copy it to clipboard: Please paste it here.
I updated the plugin to the new version yesterday and bumped into this problem now. I'm using stack. Because of issue #136 I have to work with ghc-mod-5.4.0.0. I did not changed anything I my previously working configuration.
Example:
> stack new simple
> atom simple
Trace:
haskell-ghc-mod warning: Reading cabal sandbox config failed with Error: ENOENT: no such file or directory, open '/Users/jloos/Workspace/hs/simple/cabal.sandbox.config'(…)
/Users/jloos/.atom/packages/haskell-ghc-mod/lib/util.coffee:63 haskell-ghc-mod warning: No cabal sandbox found
/Users/jloos/.atom/packages/haskell-ghc-mod/lib/ghc-mod/ghc-modi-process.coffee:133 Uncaught Error: spawn ghc ENOENT
2util.coffee:36 haskell-ghc-mod warning: ghc-mod said: simple-0.1.0.0: configure
util.coffee:36 haskell-ghc-mod warning: ghc-modi said: simple-0.1.0.0: configure
util.coffee:36 haskell-ghc-mod warning: ghc-mod said: Configuring simple-0.1.0.0...
util.coffee:36 haskell-ghc-mod warning: ghc-modi said: Configuring simple-0.1.0.0...
util.coffee:36 haskell-ghc-mod warning: ghc-mod said: Configuring simple-0.1.0.0...
@MaxDaten, try updating Atom packages. Hopefully it's fixed. If not, let me know.
@lierdakil thanks alot, the new version fixed it for me.
I solved the problem by adding the cabal bin path to my PATH
env variable.
You could do this for example by executing: export PATH=$PATH:/home/myUser/.cabal/bin
(but be aware, this isn't permanent)
@Szuuuken, that's exactly what 'Additional Path Directories' setting is for. If you add /home/myUser/.cabal/bin
there, Atom will prepend that to PATH before running ghc-mod (effectively the same as PATH=/home/myUser/.cabal/bin:$PATH
).
Today i'm install this program, but:
[Enter steps to reproduce below:]
Atom Version: 1.7.3 System: Unknown Windows Version Thrown From: haskell-ghc-mod package, v1.14.2
Haskell-ghc-mod: ghc-mod failed to launch. It is probably missing or misconfigured. ENOENT
At Error: spawn ghc-mod ENOENT
PATH: undefined
path: undefined
Path: C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Haskell\bin;C:\Program Files\Haskell Platform\7.10.3\lib\extralibs\bin;C:\Program Files\Haskell Platform\7.10.3\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Haskell Platform\7.10.3\mingw\bin;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Users\Viktor\AppData\Roaming\cabal\bin
Error
at file:///C:/Users/Viktor/.atom/packages/haskell-ghc-mod/lib/ghc-mod/ghc-modi-process.coffee:83:30
at exithandler (child_process.js:232:5)
at ChildProcess.errorhandler (child_process.js:244: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:465:9)
at process._tickCallback (node.js:379:17)
-0:39.4.0 tree-view:toggle (atom-text-editor.editor.is-focused)
undefined -0:38.1.0 core:move-down (atom-text-editor.editor.is-focused)
11x -0:28.9.0 core:page-down (atom-text-editor.editor.is-focused)
-0:25.9.0 core:page-up (atom-text-editor.editor.is-focused)
6x -0:21.4.0 core:page-down (atom-text-editor.editor.is-focused)
{
"core": {
"themes": [
"atom-dark-ui",
"one-dark-syntax"
]
}
}
# User
auto-encoding, v0.5.3
autocomplete-haskell, v0.6.5
file-icons, v1.7.12
haskell-ghc-mod, v1.14.2
highlight-selected, v0.11.2
ide-haskell, v1.6.5
ide-haskell-cabal, v1.4.0
language-haskell, v1.7.15
linter, v1.11.4
linter-csslint, v1.3.2
linter-gcc, v0.6.14
# Dev
No dev packages
@Vishtar, did you install ghc-mod? cabal install ghc-mod
Closing due to inactivity
Had the same issue, with updated version of the packages. I ran stack install ghc-mod
. Worked fine after that.
Atom Version: 1.7.2 System: Mac OS X 10.11.4 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
Commands
Config
Installed Packages