I'm new to emacs (coming from vim) and wanted to try flycheck with jshint. I have jshint installed and available in my path. However, when I try to check a buffer, I get the error:

Error while checking syntax automatically: (wrong-type-argument stringp nil)

I already set debug-on-error and got the following trace:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  signal(wrong-type-argument (stringp nil))
  #[257 "\300 \210\301@A\"\207" [flycheck-report-failed-syntax-check signal] 4 "\n\n(fn ERR)"]((wrong-type-argument stringp nil))
  funcall(#[257 "\300 \210\301@A\"\207" [flycheck-report-failed-syntax-check signal] 4 "\n\n(fn ERR)"] (wrong-type-argument stringp nil))
  #[0 "\300 \207" [flycheck-buffer] 1 "\n\n(fn)"]()
  funcall(#[0 "\300 \207" [flycheck-buffer] 1 "\n\n(fn)"])
  apply(flycheck-handle-idle-change nil)
  byte-code("r\301\302H\303H\"\210)\301\207" [timer apply 5 6] 4)
  timer-event-handler([t 22506 35301 253712 nil flycheck-handle-idle-change nil nil 115000])

But that's about far as I can go with my limited understanding of elisp...

I am able to run jshint from my terminal (and from emacs) without problems.

  • 1
    That's a bug in Flycheck. We're sorry for the inconvenience; a fix is already in review. – user227 Sep 28 '16 at 11:39

I've run into this same issue and can trace it back to this commit which in turn was a solution for having no eslint config from this issue. Downgrading to the previous version of flycheck worked for me, but it sounds like the real solution is to provide an eslint config somewhere on your path where your emacs can find it.

Updated - I just opened an issue for this to see what the proper fix is.

  • Alright, thanks for the quick response! I do now get An error occurred while installing flycheck (error: (file-error https://melpa.org/packages/flycheck-20160924.1038.tar Not found)) - and indeed the url gives me a 404. Is it possible that something went wrong during publishing or am I making a mistake? – DeX3 Sep 29 '16 at 7:01
  • Ok, it seems to work now! – DeX3 Sep 29 '16 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.