Skip to content

stack: no such file #1300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
julien-truffaut opened this issue Apr 27, 2016 · 5 comments
Closed

stack: no such file #1300

julien-truffaut opened this issue Apr 27, 2016 · 5 comments

Comments

@julien-truffaut
Copy link

Hi, I am trying to use haskell-mode with stack but I am getting the following error when I run M-x haskell-process-load-file: Searching for program: no such file or directory, stack

I have the following config:

(req-package haskell-mode
  :config (progn
    (define-key haskell-mode-map (kbd "C-c C-l") 'haskell-process-load-file)
    (add-hook 'haskell-mode-hook 'haskell-doc-mode)
    (add-hook 'haskell-mode-hook 'haskell-indentation-mode)
    (add-hook 'haskell-mode-hook 'interactive-haskell-mode)
    (add-hook 'haskell-mode-hook 'haskell-decl-scan-mode)
    (add-hook 'haskell-mode-hook (lambda ()
                   (electric-indent-local-mode -1)))
    (setq haskell-process-type 'stack-ghci)
    (setq haskell-process-path-ghci "stack")
    (setq haskell-process-args-ghci '("ghci"))

    (setq haskell-process-suggest-remove-import-lines t)
    (setq haskell-process-auto-import-loaded-modules t)
    (setq haskell-process-log nil)
    (setq haskell-stylish-on-save t)))

I have stack on my path and I was using spacemacs previously which could find stack ghci.

@gracjan
Copy link
Contributor

gracjan commented Apr 27, 2016

@julien-truffaut
Copy link
Author

julien-truffaut commented Apr 27, 2016

Thanks for the link, I added /usr/local/bin to my path but I still get the same error.

For reference:

(getenv "PATH") ==> "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

which stack  ==> /usr/local/bin/stack

@fice-t
Copy link
Contributor

fice-t commented Apr 28, 2016

Can you get a backtrace? Set debug-on-error and try the command again.

@syohex
Copy link
Contributor

syohex commented Apr 28, 2016

You need to set not only PATH environment variable but also exec-path variable.
And please check M-: (executable-find "stack") too.

See also

@julien-truffaut
Copy link
Author

Thanks! It worked once I added it to exec-path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants