2
Elm 입력 예제를 this page에서 실행하려고합니다. 특히 Text Field 예를 보면 Graphics.Input
모듈이 누락되었다는 오류가 표시됩니다.Elm Graphics.Input
내가 Main.elm
라는 파일이있어 : 나는 elm-server
을 실행하고 localhost:8000
로 이동하는 경우
import Graphics.Input as Input
main = let (field, state) = Input.field "Type here!"
in lift2 display field state
display field state =
field `above` asText state
, 나는 elm --make Main.elm
와 함께 프로젝트를 컴파일 에러
Your browser may not be supported. Are you using a modern browser?
Runtime Error in Main module:
Error: Module 'Graphics.Input' is missing. Compile with --make flag or load missing module in a separate JavaScript file.
The problem may stem from an improper usage of:
Input.field, above
에게 저에게
을 제공합니다elm: Graphics/Input.elm: openFile: does not exist (No such file or directory)
다시 설치하려면 Graphic.Input
을 설치해야합니까?
추가 참고 :
- 나는 데비안 시스템에서이 작업을 실행하고 (2013 6월 15일) 비교적 최근에
cabal install elm
를 사용하여 설치하고있다. 현재 버전은Elm-0.7.1.1
으로 표시됩니다. - 내가
chromium
JS 프롬프트로 넘어 가서 찌르면Elm.Graphics.Input
모듈이 없지만 은이고Elm.Input
입니다.field
이라는 기능이 없으며 비슷한 모양의textField
이라는 문자가 있지만 쉽게 바꿔 쓸 수있는 것은 아닙니다.
이 실행 :
import Input
main = let (field, state) = textField "Type here!"
in lift2 display field state
display field state =
field `above` asText state
나에게
Your browser may not be supported. Are you using a modern browser?
Runtime Error in Main module:
TypeError: a is undefined
The problem may stem from an improper usage of:
above
언제 elm을 설치 했습니까? 지금 당장인가요, 아니면 얼마 전 이었습니까? 어떤 버전을 설치 했습니까? – sepp2k
며칠 전. '.cabal/share'에있는 폴더는'Elm-0.7.1.1'이라고 불립니다. 그래서 나는 그것이 내가 가지고있는 버전이라고 가정합니다. 추가 메모로 질문을 업데이트했습니다. – Inaimathi