view : Int -> Html Msg
view count =
div []
[ button [ onClick Decrement ] [ text "-" ]
, div [] [ text (String.fromInt count) ]
, button [ onClick Increment ] [ text "+" ]
]
Below the rest of the session from the shell on MacOs catalina.
The server launch but when accessing the page from the browser, it dies.
I pasted the session I don't know to go from there. It seems elm-live want to
access some file. Do I need to run it from a specific place ?
At the end of the session are the version number of mpm, elm, elm-live.
Probably not a bug. More like a PEBCAK. Help!!!
Thx for your help.
$ elm-live src/Main.elm
elm-live:
Server has been started! Server details below:
internal/fs/utils.js:427
throw new ERR_INVALID_ARG_TYPE(propName, ['string', 'Buffer', 'URL'], path);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be one of type string, Buffer, or URL. Received type undefined
at readFile (fs.js:286:10)
at /usr/local/lib/node_modules/elm-live/node_modules/crocks/Async/index.js:54:10
at Object.fork (/usr/local/lib/node_modules/elm-live/node_modules/crocks/Async/index.js:155:20)
at /usr/local/lib/node_modules/elm-live/node_modules/crocks/Async/index.js:254:41
at settle (/usr/local/lib/node_modules/elm-live/node_modules/crocks/Async/index.js:151:16)
at ReadFileContext.callback (/usr/local/lib/node_modules/elm-live/node_modules/crocks/Async/index.js:56:47)
at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:230:13)
bash-3.2$ npm --version
6.9.0
bash-3.2$ elm --version
0.19.0
bash-3.2$ elm-live --version
4.0.0-rc.1
I wanted to try elm-live to familiarize myself with elm. I installed elm/html I created a src/Main.elm by pasting the example from the elm/html.
import Html exposing (Html, button, div, text) import Html.Events exposing (onClick)
type Msg = Increment | Decrement
view : Int -> Html Msg view count = div [] [ button [ onClick Decrement ] [ text "-" ] , div [] [ text (String.fromInt count) ] , button [ onClick Increment ] [ text "+" ] ]
Below the rest of the session from the shell on MacOs catalina. The server launch but when accessing the page from the browser, it dies. I pasted the session I don't know to go from there. It seems elm-live want to access some file. Do I need to run it from a specific place ? At the end of the session are the version number of mpm, elm, elm-live. Probably not a bug. More like a PEBCAK. Help!!! Thx for your help.
$ elm-live src/Main.elm
elm-live: Server has been started! Server details below:
elm-live: The build has succeeded.
elm-live: Watching the following files:
internal/fs/utils.js:427 throw new ERR_INVALID_ARG_TYPE(propName, ['string', 'Buffer', 'URL'], path); ^
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be one of type string, Buffer, or URL. Received type undefined at readFile (fs.js:286:10) at /usr/local/lib/node_modules/elm-live/node_modules/crocks/Async/index.js:54:10 at Object.fork (/usr/local/lib/node_modules/elm-live/node_modules/crocks/Async/index.js:155:20) at /usr/local/lib/node_modules/elm-live/node_modules/crocks/Async/index.js:254:41 at settle (/usr/local/lib/node_modules/elm-live/node_modules/crocks/Async/index.js:151:16) at ReadFileContext.callback (/usr/local/lib/node_modules/elm-live/node_modules/crocks/Async/index.js:56:47) at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:230:13) bash-3.2$ npm --version 6.9.0 bash-3.2$ elm --version 0.19.0 bash-3.2$ elm-live --version 4.0.0-rc.1