Elm-live opens wrong js file

235 views Asked by At

I'm having problem starting up my elm app. I've entered the correct directory (~ > Projects > elm > KDVnet_elmNERD), and entered this command:

elm-live src/Main.elm --output=elm.js --open --push

but receive this output:

  Success! Compiled 1 module.
Successfully generated elm.js

elm-live:
  elm-make has succeeded. Starting the server! We’ll open your app
  in the default browser as soon as it’s up and running.

[0001] info  Server running at http://localhost:8000/ (connect)
[0001] info  LiveReload running on 35729
[0002] 30ms          0B GET    304 /
[0002] 5ms          25B GET    404 /script.js
[0016] 3ms           0B GET    304 /
[0016] 1ms          25B GET    404 /script.js

Yesterday, I was working on a javascript project, in a file called 'script.js', which was running on a SimpleHTTPServer, on port 8000 (python -m SimpleHTTPServer 8000), but I've shut down that server.

Here is my Html file:

<!DOCTYPE HTML>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <script type="text/javascript" src="/elm.js"></script>
        <link rel="stylesheet" type"text/css" href="styles.css" />
        <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
        <link rel="stylesheet" href="https://code.getmdl.io/1.2.1/material.green-orange.min.css">
    </head>

    <body class="mdl-color--grey-100 mdl-color-text--grey-700 mdl-base">
    </body>

    <script type="text/javascript">
         var app = Elm.Main.fullscreen();
    </script>
</html>
1

There are 1 answers

0
Sam Phillips On

I solved the problem by adding 'index.html' to the url (http://localhost:8000/index.html), though I've never had to do that in the past. If anyone has any suggestions what might be going on, I'm happy to hear them.