error-message-catalog icon indicating copy to clipboard operation
error-message-catalog copied to clipboard

confusing error when running `elm install` on a read-only elm.json

Open Zimmi48 opened this issue 5 years ago • 2 comments

Quick Summary: message triggered by elm install elm/json on a freshly created elm-spa application.

SSCCE

elm-spa init # Accept default values
cd my-elm-spa
elm install elm/json # Accept to move to direct dependencies

Gives the error:

I ran into something that bypassed the normal error reporting process!
extracted whatever information I could from the internal error:

>   /home/theo/my-elm-spa/elm.json: openBinaryFile: permission denied 
  • Elm: 0.19.1
  • elm-spa: version 5.0.2
  • Browser: N/A
  • Operating System: NixOS

Additional Details

If this is not reproducible, this might be due to the way I installed Elm and elm-spa using Nix. I would appreciate if someone could tell me whether they can reproduce this issue using the most standard (npm) installation method.

Zimmi48 avatar Jul 16 '20 13:07 Zimmi48

Thanks for reporting this! To set expectations:

  • Issues are reviewed in batches, so it can take some time to get a response.
  • Ask questions a community forum. You will get an answer quicker that way!
  • If you experience something similar, open a new issue. We like duplicates.

Finally, please be patient with the core team. They are trying their best with limited resources.

github-actions[bot] avatar Jul 16 '20 13:07 github-actions[bot]

This should have been obvious from the start but I realize this only now: the error comes from the fact that somehow, this elm.json file didn't have any write-permissions. I suppose this is therefore mainly a bug of elm-spa, but I guess I'll still leave the issue open here because the Elm maintainers might still want to fix elm to fail graciously in the case of a read-only elm.json file.

Zimmi48 avatar Jul 16 '20 13:07 Zimmi48