Holger Ludvigsen
Holger Ludvigsen

Reputation: 2546

How do I update an Elm package?

I have a dependency in elm.json to elm/browser version 1.0.1. How do I update it using elm?

{
    "dependencies": {
        "direct": {
            "elm/browser": "1.0.1",
            ...

Simply updating it by hand in elm.json makes Elm complain:

-- INVALID PACKAGE DEPENDENCIES --------------------------------------- elm.json

The dependencies in your elm.json are not compatible.

Upvotes: 6

Views: 1665

Answers (1)

simplystuart
simplystuart

Reputation: 463

If you have access to install npm packages on your system, then I recommend the elm-json package:

https://github.com/zwilias/elm-json

It was designed to "Install, upgrade and uninstall Elm dependencies", and it's easy to use!

If you don't have the ability to install npm packages, then I would remove the elm/browser line from elm.json and install again with elm install elm/browser.

Upvotes: 8

Related Questions