elm / error-message-catalog

A catalog of broken Elm programs / data to improve error messages
BSD 3-Clause "New" or "Revised" License
174 stars 17 forks source link

Confusing error when attempting to install a pre-0.19 package #334

Open sentience opened 4 years ago

sentience commented 4 years ago

Intending to install elm-community/list-extra, I mistakenly typed:

elm install elm-community/elm-list-extra

…which refers to the obsolete elm-community/elm-list-extra repo.

The error this produced was confusing:

-- PROBLEM SOLVING PACKAGE CONSTRAINTS -----------------------------------------

I need the elm.json of elm-community/elm-list-extra 2.0.0 to help me search for
a set of compatible packages, but I ran into corrupted information from:

    https://package.elm-lang.org/packages/elm-community/elm-list-extra/2.0.0/elm.json

Is something weird with your internet connection. We have gotten reports that
schools, businesses, airports, etc. sometimes intercept requests and add things
to the body or change its contents entirely. Could that be the problem?

The JSON data in question does not appear to be corrupted.

The error should probably have told me that I was attempting to install an obsolete package name/version, because the package registry claims the package in question is only compatible with Elm 0.18.0.

magopian commented 2 years ago

For people stumbling on this post, this could also happen it seems if you have a dependency X with a given version (say 8.0.4) and are trying to installing a new library Y which also has a dependency with X, but with an incompatible version (say < 7.0.0).