avh4 / elm-desktop-app

the simplest way to write desktop applications in Elm
MIT License
47 stars 4 forks source link

elm-desktop-app run fails after a new dependency is added #8

Open jxxcarlson opened 4 years ago

jxxcarlson commented 4 years ago

All running ok at this point. But if I install elm-ui, elm-desktop-app run fails.

 $ npx elm install mdgriffith/elm-ui
Here is my plan:

  Add:
    mdgriffith/elm-ui    1.1.5

Would you like me to update your elm.json accordingly? [Y/n]: y
Dependencies loaded from local cache.
Dependencies ready!
 $ git diff
diff --git a/elm.json b/elm.json
index 9ba3b6b..06ed361 100644
--- a/elm.json
+++ b/elm.json
@@ -9,7 +9,8 @@
             "elm/browser": "1.0.2",
             "elm/core": "1.0.5",
             "elm/html": "1.0.0",
-            "elm/json": "1.1.3"
+            "elm/json": "1.1.3",
+            "mdgriffith/elm-ui": "1.1.5"
         },
         "indirect": {
             "elm/time": "1.0.0",
@@ -20,9 +21,5 @@
     "test-dependencies": {
         "direct": {},
         "indirect": {}
-    },
-    "elm-desktop-app": {
-        "name": "subway-salmon-cable",
-        "app-id": "net.avh4.elm-desktop-app.replace-this-with-your-own-app-id.subway-salmon-cable"
     }
-}
+}
\ No newline at end of file
 $ run start

> electron-experiment@1.0.0 start /Users/carlson/dev/elm/projects/electron-x1
> npx elm-desktop-app run

/Users/carlson/dev/elm/projects/electron-x1/elm-stuff/elm-desktop-app/app /Users/carlson/dev/elm/projects/electron-x1
/Users/carlson/dev/elm/projects/electron-x1
data should have required property 'elm-desktop-app'
avh4 commented 4 years ago

Yeah, the issue is that elm install removes any json fields it doesn't know about. Current workarounds:

avh4 commented 4 years ago

This issue is also maybe a good argument that elm-desktop-app config needs to be stored in a separate file from elm.json

klsmith commented 4 years ago

I've run into this same issue and elm-json didn't work when I tried it. I'll admit that I didn't try for very long, but I would like to be able to use elm install anyways. I think taking the configuration out into it's own file makes more sense, from my limited perspective as a brand new user of the tool.

Is there anything I can do to help get this resolved?