我是榆树的新人.看到一种允许你开发前端内容的函数式语言很有意思.现在,即使我很好地遵循这里描述的步骤,我仍然遇到模块问题.
代码是
module Main where
import Html exposing ( Html )
import Signal
main : Signal Html.Html
main = Html.text "This should work."
|> Signal.constant
Run Code Online (Sandbox Code Playgroud)
我以前elm-reactor -a='localhost'能够查看我的输出.但我收到一个错误,无法找到模块"HTML":
I cannot find find module 'Html'.
Module 'Main' is trying to import it.
Potential problems could be:
* Misspelled the module name
* Need to add a source directory or new dependency to elm-package.json
Run Code Online (Sandbox Code Playgroud)
(注意双重"发现"嘿嘿)修复建议没有帮助我.或者可能是因为我无法正确理解.json文件的使用.
ELM-的package.json:
{
"version": "1.0.0",
"summary": "testing elm",
"license": "BSD3",
"source-directories": [
".",
"./bin/"
], …Run Code Online (Sandbox Code Playgroud) elm ×1