deadfoxygrandpa / Elm.tmLanguage

Elm language syntax highlighting and tool integration for ST2/3
https://packagecontrol.io/packages/Elm%20Language%20Support
MIT License
122 stars 27 forks source link

Build error w/ 0.18 #113

Open rchangmh opened 7 years ago

rchangmh commented 7 years ago

I get the following error when running build on Sublime Text 3 when trying to build:

[WinError 2] The system cannot find the file specified [cmd: ['elm-make', 'foo.elm', '--output=build\foo.html', '--report=json', '--yes']] [dir: ~\elm] [path: ~\AppData\Roaming\npm] [Finished] (Replaced directory paths with ~)

I got this error both on my home PC and work PC, both are running Windows 10, so it doesn't seem to be unique to my setup. Spent a frustrating hour figuring out why it wasn't working -- I needed to tweak 'Elm Make.sublime-build' and edit 'elm-make' to 'elm-make.cmd'. It's odd because just 'elm-make' works perfectly fine in Powershell.

sentience commented 7 years ago

The official version of Elm language support for Sublime Text is now at https://github.com/elm-community/Elm.tmLanguage. This is the version you’ll get if you install the package using Package Control’s main package repository.

Can you check and see if you still have this issue with this version? I’m the new maintainer on the project, and would like to get it fixed if this is still a problem.

rchangmh commented 7 years ago

Unfortunately, yes.

[WinError 2] The system cannot find the file specified
[cmd: ['elm-make', '~elm\\foo.elm', '--output=/dev/null', '--report=json', '--yes']]
[dir: ~\elm]
[path: ~\npm]
[Finished]

However, it works if I add '.cmd' to the end of 'elm-make' in the build file.

...
    "cmd":
    [
        "elm-make.cmd",
        "$file",
        "--output={null}",
        "--report=json",
        "--yes"
    ],
...
nachoba commented 7 years ago

Hello, I have the same error on Windows 10. Had to fix it using the same hack as rchangmh.