elm-community / SublimeElmLanguageSupport

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

elm-make: ‘The system cannot find the file specified’ on Windows #12

Open sentience opened 7 years ago

sentience commented 7 years ago

From https://github.com/deadfoxygrandpa/Elm.tmLanguage/issues/113:

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.

bholtbholt commented 6 years ago

I installed Elm Language Support on a new computer yesterday and had this error as well. I'm unsure whether it's exactly the same problem because the computer was a Mac, but I determined it was because I didn't have Elm installed globally.

This package relies on global npm packages (Elm, elm-oracle, elm-format) in order to fully-function. It would be nice if we could rely on local npm packages, though I'm not sure what that would take to support 🙏

sentience commented 6 years ago

@bholtbholt Definitely a different issue. I've opened #38 to track this request.

thesobercoder commented 6 years ago

Thanks Kevin, spent almost more than two hours trying to figure this out. This was really frustrating. Hope it gets resolved soon, but am making do with elm-make.cmd hack.

viktorce commented 6 years ago

For elm-format you would need to edit the user settings and change "elm_format_binary" to "elm-format.cmd"

20iahazban commented 5 years ago

on windows there is no elm-make command if you install elm with Windows — installer the proper command is "elm make"

sentience commented 5 years ago

@20iahazban Are you using Elm 0.19, and if so have you upgraded to the beta version of the package that supports Elm 0.19? See the instructions in the README file for this repo.