ElixirSublime icon indicating copy to clipboard operation
ElixirSublime copied to clipboard

How to fix use error

Open sger opened this issue 9 years ago • 5 comments

Hello,

Any idea how to fix this

Error: module MyApp.Web is not loaded and could not be found

also the instructions here https://github.com/vishnevskiy/ElixirSublime/issues/5 not working

thanks

sger avatar Oct 27 '16 07:10 sger

Same.

lATAl avatar Nov 24 '16 04:11 lATAl

I'm still seeing this issue.

Ultimately defeats the purpose of the plugin if I can't trust linting errors as someone new to the language. :(

lilactown avatar Jan 24 '17 16:01 lilactown

The package downloaded by Package Control in Sublime is out of date. Most issues go away if you overwrite the installed version of this file: https://github.com/vishnevskiy/ElixirSublime/blob/master/elixir_sublime.py

Note that this script only looks through _build/dev/, so modules defined in, say, test/support/ will be reported as not load/found.

I hacked that last with the following:

def find_ebin_folders(mix_project):
    paths = []
    if mix_project is not None:
        lib_path = os.path.join(mix_project, '_build/dev/lib')
        for lib in os.listdir(lib_path):
            paths.append(os.path.join(lib_path, lib, 'ebin'))
        lib_path = os.path.join(mix_project, '_build/test/lib')
        for lib in os.listdir(lib_path):
            paths.append(os.path.join(lib_path, lib, 'ebin'))
    return paths

auxbuss avatar May 27 '17 13:05 auxbuss

Thank you @auxbuss! Your fix worked for me 😄 . A lot of frustration and googling on this.

coffee-cup avatar Jul 05 '17 05:07 coffee-cup

Another way to get the latest version is to:

  1. Open the command palette, select "Package Control: Remove Package" and then select "ElixirSublime".
  2. Open the command palette, select "Package Control: Add Repository" and enter this repo ("https://github.com/vishnevskiy/ElixirSublime.git")
  3. Open the command palette, select "Package Control: Install Package" and then select "ElixirSublime".
  4. Restart Sublime.

Then you should be tracking the git repo rather than the official package repo.

NoxHarmonium avatar Jun 15 '18 08:06 NoxHarmonium