Closed Erudition closed 8 months ago
Check your script/elm.json
. Your script/
is a separate project, just like an elm-review
project is. The reason for that is that you could have some dependencies that you want to install for your scripts, but not for your web application, or vice versa.
So whenever I upgrade elm-pages, I have to make sure to update elm-pages inside the script folder as well? I did not know this.
Okay, sure enough cd scripts && elm-json upgrade --unsafe
did the trick, phew! In case anyone else runs into this issue.
Thank you!
Yeah, so actually an elm-pages
scripts project is a completely independent Elm project. You can even have a standalone script project with no elm-pages
web application at all.
It would probably be nice to have the error message point to the file path of the elm.json
which has the outdated package to make it very explicit.
Agreed. Or better yet, modify the elm.json to match the elm-pages project's versions.
You can't assume that you can update their elm.json, for one thing you don't know if that's their intention, but also there could be conflicting dependencies making it impossible to manually update the elm.json. But yeah, a nice error message to indicate explicitly where the problem is coming from would be nice, but the user needs to choose if and when they want to upgrade.
You could imagine for example that there's a breaking API change, so the user might want to defer updating their dependencies in their script project. It's just not an option to assume the user wants to upgrade.
I can
build
anddev
and run elm-pages just fine, until I try to run an add pages script, when for some reason I get this:package.json
contains:elm.json
contains:The docs indicate that these two versions are a match.
The contents of
~/.elm/0.19.1/packages/dillonkearns/elm-pages/10.0.3/src/Pages/Internal/Platform/CompatibilityKey.elm
are:The contents of
~/Projects/elm-website/node_modules/elm-pages/generator/src/compatibility-key.js
are:So the compatibility Key is the same. Note that this is from version 3.0.12, not 3.0.11. So that packageVersion string is wrong. However, changing it to 12 does not fix anything.
In addition to getting help with this issue, I'd like to suggest the version mismatch error message be more helpful -- e.g. what are the two versions, what are the compatibility keys.