error-message-catalog icon indicating copy to clipboard operation
error-message-catalog copied to clipboard

Confusing error when attempting to install a pre-0.19 package

Open sentience opened this issue 5 years ago • 1 comments
trafficstars

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.

sentience avatar Apr 16 '20 05:04 sentience

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).

magopian avatar Dec 07 '21 17:12 magopian