The Oddler
The Oddler

Reputation: 6708

Elm Make starts Windows Script Host and gives error?

I'm playing in Elm, and whenever I use elm make I get an error from Windows Script Host:

enter image description here

The error states that there is an error in the build elm.js file. And when I look at the given line, it's the following:

return {
    keys: keys,     // A hash of key name to index
    free: free,     // An array of unkeyed item indices
} // line 10547

So I'm guessing it's bitching about the unneeded , on line 10546: free: free,.

But now my question is, why is Windows Script Host doing stuff with my build elm.js file anyway, and how can I fix it?

I already tried disabling Windows Script Host, but then I just get an error stating that it doesn't allow script to be run.

Upvotes: 2

Views: 456

Answers (1)

Chad Gilbert
Chad Gilbert

Reputation: 36375

Since you have a file in that directory called elm.js, the Windows Command Line tries executing that when you type elm make. It thinks you are intending this: elm.js make.

You can get around this in a few ways:

  1. Change the name of the output file from elm.js to something else
  2. Move the generated elm.js file to a subdirectory
  3. Run elm-make from the command line instead of elm make
  4. Use another shell like Powershell, Git Bash, or Cygwin

Upvotes: 4

Related Questions