maxgurewitz / elm-server Goto Github PK
View Code? Open in Web Editor NEWnpm package for compiling, serving, and hot-reloading Elm code
npm package for compiling, serving, and hot-reloading Elm code
Firstly tx for a very handy npm lib.
Had a hard time coming up with a short description, so here's a bit of context:
So a typical scenario in my sample app (https://github.com/rundis/albums):
elm-server Main.elm --output main.js --start-path index.html
http://localhost:3001
http://localhost:3001/artists
http://localhost:3001/artists
That sort of ruins the flow quite a bit. So it would be super awesome if there was some solution to handle this scenario. Maybe a glob-pattern to tell the server to serve (say index.html) for any url in the glob pattern ?
Hi,
Here's what I get in the console:
events.js:141
throw er; // Unhandled 'error' event
^
Error: spawn /usr/local/lib/node_modules/elm-server/node_modules/elm/Elm-Platform/0.17.1/.cabal-sandbox/bin/elm-make ENOENT
at exports._errnoException (util.js:860:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at doNTCallback2 (node.js:450:9)
at process._tickCallback (node.js:364:17)
at Function.Module.runMain (module.js:459:11)
at startup (node.js:136:18)
at node.js:972:3
I have elm-make
in $PATH
:
$ which elm-make
/usr/local/bin/elm-make
There's also another one in
/usr/local/lib/node_modules/elm-server/node_modules/elm/binwrappers/elm-make
But the path elm-server
is trying to run doesn't exist.
Trying to run the buttons example from the current Elm repository (https://guide.elm-lang.org/architecture/user_input/buttons.html) yields the following. This repo is broken and seemingly hasn't been updated in a while. Don't use it.
patientplatypus:~/Documents/elmTree:08:21:19$elm-server ./Main.elm
events.js:182
throw er; // Unhandled 'error' event
^
Error: spawn /Users/patientplatypus/.nvm/versions/node/v8.1.4/lib/node_modules/elm-server/node_modules/elm/Elm-Platform/0.17.1/.cabal-sandbox/bin/elm-make ENOENT
at exports._errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:189:19)
at onErrorNT (internal/child_process.js:366:16)
at _combinedTickCallback (internal/process/next_tick.js:102:11)
at process._tickCallback (internal/process/next_tick.js:161:9)
at Function.Module.runMain (module.js:607:11)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:575:3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.