Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for setup up a develop version of the project locally #21

Open
narrsam opened this issue Jun 18, 2023 · 3 comments
Open
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@narrsam
Copy link

narrsam commented Jun 18, 2023

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.

@ChrisWellsWood
Copy link
Collaborator

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.

@narrsam
Copy link
Author

narrsam commented Jun 19, 2023

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.

@ChrisWellsWood
Copy link
Collaborator

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.

@ChrisWellsWood ChrisWellsWood changed the title Compiling and running from source code Add documentation for setup up a develop version of the project locally Jun 19, 2023
@ChrisWellsWood ChrisWellsWood self-assigned this Jun 19, 2023
@ChrisWellsWood ChrisWellsWood added the documentation Improvements or additions to documentation label Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: No status
Development

No branches or pull requests

2 participants