elm-package
elm-package copied to clipboard
Confusing error when specified versions aren't available
I had the following elm-package.json
{
"version": "1.0.0",
"summary": "Sample Elm Test",
"repository": "https://github.com/user/project.git",
"license": "BSD-3-Clause",
"source-directories": [
".",
"../src"
],
"exposed-modules": [],
"dependencies": {
"elm-lang/core": "4.0.0 <= v < 5.0.0",
"rtfeldman/node-test-runner": "2.0.1 <= v < 3.0.0"
},
"elm-version": "0.17.0 <= v < 0.18.0"
}
and got an error when running
~/Projects/elm-uuid/tests$ rm -rf elm-stuff
~/Projects/elm-uuid/tests$ elm-package install
elm-package: elm-stuff/exact-dependencies.json: openBinaryFile: does not exist (No such file or directory)
As it turned out version 2.0.1 of "rtfeldman/node-test-runner" hadn't been published yet (it was only tagged on github). Ideally the error message would have been something along the lines of
Unable to resolve "rtfeldman/node-test-runner" within the range "2.0.1 <= v < 3.0.0"
Available versions "1.0.0 <= v <= 2.0.0"
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
Nice, thank you for reporting this!
@evancz would an SSCCE help here, or is this clear enough as-is?
See https://github.com/opsb/confusing-elm-package-error to replicate