zwilias / elm-json

Install, upgrade and uninstall Elm dependencies
MIT License
183 stars 9 forks source link

"MISSING ELM.JSON" error at root of project #32

Open supermacro opened 4 years ago

supermacro commented 4 years ago

I ran elm-json upgrade supermacro/elm-antd at the root of my project (see the below directory structure diagram) and got the following error:

-- MISSING ELM.JSON ------------------------------------------------------------

No such file or directory (os error 2)

But as you can see from the below diagram, the elm.json is there.

Directory Structure:

.
├── README.md
├── elm-analyse.json
├── elm-stuff
├── elm.json
├── node_modules
├── package-lock.json
├── package.json
├── postcss.config.js
├── renovate.json
├── src
└── webpack.config.js

Interestingly, elm-json tree does work.

zwilias commented 4 years ago

upgrade doesn't support a package-name, so that argument is interpreted as the path to elm.json :)

I hadn't really considered use-cases where upgrading only a single makes sense. Let me think about that for a bit 😄

supermacro commented 4 years ago

Oh, woops! I misinterpreted [INPUT] in the --help output:

➜  ~ elm-json upgrade --help
elm-json-upgrade 
Bring your dependencies up to date

USAGE:
    elm-json upgrade [FLAGS] [INPUT]
hojberg commented 2 years ago

Hmm this started happening for me randomly with elm-json install. I think maybe there's some cache thats causing this? I was semi offline when this started happening and even fully online it now persists.

hojberg commented 2 years ago

deleting ~/.elm/elm-json made this work again for me.