question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expected Behavior

format file when saving or calling format action manually

Current Behavior

formating fails with

[Warn  - 13:12:09] {"shortMessage":"Command failed with exit code 127: elm-format --stdin --elm-version 0.19 --yes","command":"elm-format --stdin --elm-version 0.19 --yes","exitCode":127,"stdout":"","stderr":"env: node: No such file or directory\n","failed":true,"timedOut":false,"isCanceled":false,"killed":false}

elm-format is installed globally, also tried locally and explicit path in settings - same error with different path before elm-format

Possible Solution

Steps to Reproduce (for bugs)

  1. Setup project like proposed in readme
  2. Execute Format action of vscode

Context

Your Environment

  • Version used: 0.10.2
  • Editor name and version (e.g. VSCode 1.36.1): VSCode 1.45.1
  • Environment name and version (e.g. node.js 5.4): nodejs v14.3.0, elm 0.19.1
  • Operating System and version: macOS 10.15.4

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:23 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
razzeeecommented, May 21, 2020

Can you try to reinstall it? We recently had someone who thought it got stuck on install and aborted it and it still was callable from path.

1reaction
kewpcommented, Dec 10, 2020

Just setup a new machine and having the same issue. elm-format doesn’t run when I save.

  • I’ve tried uninstalling / reinstalling the VS code plugin
  • I can run elm-format from the command line
  • I have a elm.json in the root folder
  • I also have a elm-tooling.json in the root folder
  • I’ve open the project folder up in VS code (see my solution previously)
  • I’ve tried several different .elm files. Same result
  • I’ve tried setting the Elm Format Path directly

Not sure what else to try.

The Elm output in VS code looks fine. No mention of elm-format, though.

[Info  - 14:48:57] Find entrypoints: Using entrypoints from c:\Users\karlp\elm-aws\elm-tooling.json: ["./src/ElmUITest.elm"]. See https://github.com/elm-tooling/elm-language-server#configuration for more information.
[Info  - 14:48:57] A code lens resolve was requested for file:///c%3A/Users/karlp/elm-aws/src/LoadTest.elm
[Info  - 14:48:58] A code action was requested
[Info  - 14:48:58] Document Symbols were requested
[Info  - 14:48:58] Folding ranges were requested
[Info  - 14:48:58] Returned 8 folding ranges
[Info  - 14:48:58] A code lens was requested for file:///c%3A/Users/karlp/elm-aws/src/ElmUITest.elm
[Info  - 14:48:58] A code action was requested
Read more comments on GitHub >

github_iconTop Results From Across the Web

elm-format | Yarn - Package Manager
Use elm make to see a detailed error if elm-format fails. New features: In module and import lines, exposing is automatically added if...
Read more >
Elm VSCode plugin does not format on save - Stack Overflow
I have set the absolute path to my global install of elm-format in settings.json . I have also set format on save for...
Read more >
ELM Format for the TCP ELM Link Programming Model
This section describes the format and content of the enhanced listener message (ELM) used by the TCP ELM Link programming model.
Read more >
elm-format driving me nuts in VSCode - Reddit
I can't seem to reliably get elm-format to do its thing in VSCode. ... Message: Request textDocument/formatting failed with message: Cannot ...
Read more >
Elm - Visual Studio Marketplace
You will need to install elm and elm-test to get all diagnostics and elm-format for formatting. If your setup fails to find the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found