halohalospecial / atom-elmjutsu

A bag of tricks for developing with Elm. (Atom package)
https://atom.io/packages/elmjutsu
MIT License
192 stars 24 forks source link

Error notification 'Could not find elm-package.json' #18

Closed raffomania closed 7 years ago

raffomania commented 7 years ago

This notification pops up every time I start atom in a non-elm project. Is there a way to make it less obtrusive?

halohalospecial commented 7 years ago

Hi @raffomania, that notification should only appear if you have an open .elm file :-)

raffomania commented 7 years ago

Interesting. It happens to me even in an empty folder. Any hints to debug this?

halohalospecial commented 7 years ago

Hmm, that's weird. Can you provide a screen capture so that I can see your workflow?

raffomania commented 7 years ago

Here you go. It's a pretty standard setup. Atom and all packages are up to date.

halohalospecial commented 7 years ago

Thank you for the screen cap. That sure is weird! Maybe another installed package has a bad interaction with elmjutsu (happened more than once before).

To be sure, you can do the following:

  1. Quit Atom.
  2. Rename ~/.atom (e.g. mv ~/.atom ~/.atom-backup).
  3. Open Atom. Atom will create a new ~/.atom directory.
  4. Install language-elm and elmjutsu.
  5. Quit Atom.
  6. Open Atom again to check if the issue is still there.
  7. If the issue has been resolved, you can install packages one by one to find out which has a bad interaction with elmjutsu.

P.S. I'm also usually online on https://elmlang.slack.com :-)

halohalospecial commented 7 years ago

@raffomania Not sure if you had this resolved already. If not, you can try the latest version (2.8.4). I fixed something that might be related to your issue.

raffomania commented 7 years ago

Wow, seems to be fixed with the latest version. Thanks a lot for this awesome plugin!

amitaibu commented 6 years ago

I've just updated to 7.1.5 and I experience this error whenever I open my project in a subdirectory (i.e. the elm-package.json is not present in the project).

If it's included, elmjitsu seems to work fine.

halohalospecial commented 6 years ago

How does the directory structure look like?

amitaibu commented 6 years ago
client (is the root, has `elm-package.json`)
    |_ src
       |_elm (this is where I open Atom)
           |_ App
           |_ Backend
           |_ Pages
       |_assets
       |_js
halohalospecial commented 6 years ago

The elm directory is the Atom project? Can you try opening client as the Atom project instead?

amitaibu commented 6 years ago

Yes, if I open the client it works ok -- but up until the recent update (it was 7.1.2 if I'm not mistaken) it worked also by opening the elm directory.

halohalospecial commented 6 years ago

Yeah, sorry, it was to prevent it from going beyond the project directory when an elm-package.json doesn't exist. (See https://github.com/halohalospecial/atom-elmjutsu/issues/24.) Maybe there's a better way?

amitaibu commented 6 years ago

Just to clarify -- it seems #24 was solved long time ago (and it worked fine until my update today)

halohalospecial commented 6 years ago

Hmm.. maybe better to revert to the old behavior :) I'll include the fix in the next release. Thanks!