Open towc opened 5 years ago
:set backupcopy=yes or ~/.vimrc set backupcopy=yes
:set backupcopy=yes or ~/.vimrc set backupcopy=yes
Thanks !! It's the solution, indeed, but it doesn't explain the problem. I had the same error with any live-reloading solution, and it was due to the elm file being rewritten by a vim plugin reformatting the source file at each save: The plugin uses a temporary file and during the short time the source file does not exist, elm-live thinks it is gone, then end up with an error (MODULE NOT FOUND). Just by adding this line in the .vimrc solves the issue.
There is a possible improvement for elm-live : add an option to delay the live-reload by an arbitrary duration, just to give a little more time for the vim plugin to reformat and save the file.
Possibly related to https://github.com/wking-io/elm-live/issues/97
elm-live version 4.0.0-rc.1 vim 8.1
Sometimes when saving
src/Main.elm
with vim,elm-live src/Main.elm
might exit unexpectedly.It's quite rare, and I couldn't link it to any specific context. I've tried
Sometimes it just doesn't see some updates, but doesn't quit, and will pick up the next change.
Other times it just stops watching. This might not be vim related. One way to reproduce is with a fresh elm.json, and running
elm install elm/json
, which will move it from indirect to direct dependencies. After that command, the already runningelm-live
will keep running, but won't pick up any changesHere are some logs of failures, all with exit code 0: