Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple program compiled without error gives a white page

Tags:

elm

I compiled the "Hello world" program

import Html exposing (text)

main =
  text "Hello, World!"

with elm 0.17 on Windows, without compile errors:

elm make hello.elm --output index.html

When I open Chrome on index.html, I get a blank page. Chrome's console shows 2 errors in index.html :

Uncaught ReferenceError: _elm_lang$virtual_dom$VirtualDom$text is not defined
Uncaught ReferenceError: Elm is not defined

If I run the elm-reactor on that file, I also get a white page, and similar errors in the console.

Somehow, a path is missing... Here is the elm-package.json file:

{
"version": "1.0.0",
"summary": "helpful summary of your project, less than 80 characters",
"repository": "https://github.com/user/project.git",
"license": "BSD3",
"source-directories": [
    "."
],
"exposed-modules": [],
"dependencies": {
    "elm-lang/core": "4.0.0 <= v < 5.0.0",
    "elm-lang/html": "1.0.0 <= v < 2.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}

What should I do ?

like image 870
Pierre Carbonnelle Avatar asked May 31 '16 17:05

Pierre Carbonnelle


1 Answers

I fixed it by deleting the elm-stuff subdirectory. At the next make, it reinstalls the missing packages, and everything works fine.

like image 100
Pierre Carbonnelle Avatar answered Oct 28 '22 21:10

Pierre Carbonnelle