dmy / elm-doc-preview

Elm offline documentation previewer

Home Page:https://www.npmjs.com/package/elm-doc-preview

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doc server quits with error below after 10-30 seconds.

jxxcarlson opened this issue · comments

I am getting this error:

 $ elm-doc-preview
elm-doc-preview 3.0.4 using elm 0.19.1
Previewing jxxcarlson/elm-typed-time 1.0.0 from /Users/carlson/dev/elm/projects/typed-time
Browse <http://localhost:8000> to see your documentation
  |> watching package
  |> building /Users/carlson/dev/elm/projects/typed-time documentation
TypeError: Cannot read property 'length' of null

This error occurs within 15 seconds of starting elm-doc-preview. Could something be wroing with one of my files?

Do you have the full error message ?
elm-doc-preview will run only on files modification, did you modify files when the error occurred?

I cannot reproduce with the HEAD of master branch of https://github.com/jxxcarlson/elm-typed-time.
Could you please give me:

  • the exact commit of this repo that leads to the error
  • your nodejs version (nodejs --version)
  • your operating system version

Thank you

Was able to reproduce the error. (The library is OK, but the server running elm-doc-preview crashes). Here is the full error message:

 $ elm-doc-preview
elm-doc-preview 3.0.4 using elm 0.19.1
Previewing jxxcarlson/elm-typed-time 1.0.0 from /Users/carlson/dev/elm/projects/typed-time
Browse <http://localhost:8000> to see your documentation
  |> watching package
  |> building /Users/carlson/dev/elm/projects/typed-time documentation
  |> ::ffff:127.0.0.1 connected
TypeError: Cannot read property 'length' of null

OS: Mac OS 10.15.2
Node: v12.10.0

Commit: https://github.com/jxxcarlson/elm-typed-time, 1db8654a3b01bf3330cb170f9b0107bc62290b77

I'm not able to reproduce it and without a stack trace to indicate the source of the exception in the code, I'm not sure how to investigate.

I suspect this might be linked to specific issues of the files watcher on OSX which I don't use.

Did you use another software at the same time that could have saved or modified your package source code (editor or something) after 10/30 seconds?

Yes, that was it. I tried closing various things (editors). I usually just run elm make and such like, but could not identify the culprit. I finally ended up restarting my computer, after which the problem disappeared. This verifies your diagnosis. Sorry for the trouble.