question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stuck at "No Elm projects found" & "Attach elm.json (or elm-packages.json)"

See original GitHub issue

Under Windows 10 1903, with PhpStorm 2019.2.3, my editor keeps saying “No Elm projects found” & “Attach elm.json (or elm-packages.json)”

When I “attach” an elm.json, I’m getting the error: org.elm.workspace.ProjectLoadException: Could not find file C:\Users\hjpol\AppData\Roaming\elm\0.19.0\package\elm\browser\1.0.1\elm.json. Is the package installed?

Well, there is no C:\Users\hjpol\AppData\Roaming\elm\ on my system, so that’s true.

The plugin (under settings) can find the the elm compiler, and elm-format.

I do have elm installed:

>elm
Hi, thank you for trying out Elm 0.19.1. I hope you like it!

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
klazukacommented, Aug 25, 2020

@HenkPoley the issue described in your most-recent comment will be fixed by #688 . I now install the dependencies automatically by copying the elm.json file into a temporary directory along with a dummy .elm file and compiling it.

This will fix the case where users simply have not ever downloaded the dependencies, as well as the case that you mentioned where the elm-stuff directory has the dependencies cached, but the dependencies are not actually installed in Elm’s global package cache.

1reaction
HenkPoleycommented, Oct 25, 2019

Solution:

  • All your .elm source files need to be in src/, or well… the directories that are pointed at in elm.json: { "source-directories": [ "src" ] }.
  • You need to have run elm make or elm reactor (this was important on a colleague’s machine that I tested as a ‘clean slate’)

Maybe make this more explicit?

  • Say that the currently opened .elm file is not in any of the source-directories mentioned in elm.json.
  • Tell the user which directories are in the list
  • Offer to add the directory to the elm.json
  • Offer to run elm make to download the libraries

Tangentially related:

I’ll also patch https://github.com/henkPoley/laravel-elm/tree/patch-1/ to drop the example .elm file in src/. composer install tightenco/laravel-elm:dev-patch-1 with this added to composer.json first:

    "repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/HenkPoley/laravel-elm"
    }

Edit: maybe I’ll need to figure out the best place to drop this file, since the elm compiler will complain if it’s in src/Example/Main.elm, and not src/Main.elm.

Read more comments on GitHub >

github_iconTop Results From Across the Web

elm-package.json failing to load - intellij idea - Stack Overflow
I am attempting to create an Elm project in Intellij. To do this, I am using a fairly standard elm-package.json fle:
Read more >
FAQ - elm-tooling-cli - GitHub Pages
Finally, the elm , elm-format and elm-json npm packages are essentially hacks. The elm npm package for instance does not contain Elm at...
Read more >
Elm-json fails to fetch package versions - Learn
Hi, Whenever I run npx elm-app test (or elm-review, etc.), it fails with the following message. ❯ npx elm-app test Solving dependencies Failed...
Read more >
There, fixed the docs for you - jfmengels' blog
This is a rule specifically for Elm packages. ... to latest or to a different version than the one found in elm.json ,...
Read more >
My first Elm - Google Groups
js. It has a grunt build, and css to compile, images to optimze, js and html to minify etc. I still want to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found