midi-surf
midi-surf copied to clipboard
Add documentation for setup up a develop version of the project locally
I am trying to get into elm and fiddle with the source code myself. I'm totally new to web dev and Elm, I mostly work on .net desktop apps.
When I run elm make Main.elm
and try to open the resulted index.html I get this error:
Initialization Error
Error: Problem with the flags given to your Elm program on initialization.
Problem with the given value:
undefined
Expecting an OBJECT with a field named `mInitialState`
Can you help me get started on this? I'm probably missing something very basic.
Hi @narrsam, I use create-elm-app
to manage bundling everything up, unless it's compiled, you can't just open the index.html
file. Instructions for installation can be found here. Once you've installed it, navigate to the midi-surf
folder and run elm-app start
and it should launch a dev server with live update. Let me know if I can help you with anything. The code isn't very well documented at the moment, as it's just been me that's working on it, but at least the code base isn't huge.
Thank you so much for your swift reply.
I was finally able to build and run the app using the create-elm-app package.
I initially ran into this error when trying to elm-app build
:
error:0308010C:digital envelope routines::unsupported
Using the top voted solution on this StackOverflow page I was able to fix it.
Basically, I downgraded node from 18.x.x to 16.20.0.
No problem. I'm using NJS 18.x, if you'd prefer to use that, you can start the server with:
- Linux -
export NODE_OPTIONS=--openssl-legacy-provider; elm-app start
- Windows PowerShell -
$env:NODE_OPTIONS="--openssl-legacy-provider" ; elm-app start
I'll need to add all this to the README, I didn't really expect people to tinker with the code, but I'm very glad you are! I'm going to keep this open, but change the title of the issue to reflect the need to update the README.