我编译了" Hello world "程序
import Html exposing (text)
main =
text "Hello, World!"
Run Code Online (Sandbox Code Playgroud)
在Windows上使用elm 0.17,没有编译错误:
elm make hello.elm --output index.html
Run Code Online (Sandbox Code Playgroud)
当我在index.html上打开Chrome时,我会看到一个空白页面.Chrome的控制台在index.html中显示2个错误:
Uncaught ReferenceError: _elm_lang$virtual_dom$VirtualDom$text is not defined
Uncaught ReferenceError: Elm is not defined
Run Code Online (Sandbox Code Playgroud)
如果我在该文件上运行elm-reactor,我也会得到一个白页,并在控制台中出现类似的错误.
不知何故,路径丢失了...这是elm-package.json文件:
{
"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"
}
Run Code Online (Sandbox Code Playgroud)
我该怎么办 ?
| 归档时间: |
|
| 查看次数: |
751 次 |
| 最近记录: |