Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

function Skylight.Plug.init/1 is undefined #5

Open
fbjork opened this issue Apr 25, 2017 · 9 comments
Open

function Skylight.Plug.init/1 is undefined #5

fbjork opened this issue Apr 25, 2017 · 9 comments

Comments

@fbjork
Copy link

fbjork commented Apr 25, 2017

Getting this error when I try to boot my Phoenix 1.3 app. Any ideas?

== Compilation error on file lib/my_app/web/endpoint.ex ==
** (UndefinedFunctionError) function Skylight.Plug.init/1 is undefined (module Skylight.Plug is not available)
    Skylight.Plug.init([])
    (plug) lib/plug/builder.ex:193: Plug.Builder.init_module_plug/3
    (plug) lib/plug/builder.ex:181: anonymous fn/4 in Plug.Builder.compile/3
    (elixir) lib/enum.ex:1755: Enum."-reduce/3-lists^foldl/2-0-"/3
    (plug) lib/plug/builder.ex:181: Plug.Builder.compile/3
    (plug) expanding macro: Plug.Builder.__before_compile__/1
    lib/my_app/web/endpoint.ex:1: MyApp.Web.Endpoint (module)
    (elixir) lib/kernel/parallel_compiler.ex:117: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/1
@wagenet
Copy link
Contributor

wagenet commented Apr 28, 2017

@fbjork sorry for the delay in replying to this. I will try to investigate soon and get back to you.

@wagenet
Copy link
Contributor

wagenet commented Apr 28, 2017

Did you run:

mix deps.get
mix skylight.fetch

@fbjork
Copy link
Author

fbjork commented May 1, 2017

I ran mix deps.get before. I get the same error after trying mix skylight.fetch

@wagenet
Copy link
Contributor

wagenet commented May 1, 2017

Sorry about this. I will try to allocate some time to give it a more in-depth look soon. Once we get it sorted out, I'd be happy to reset your trial period (assuming you are on a trial right now).

@bAmpT
Copy link

bAmpT commented Jun 16, 2017

I also can't compile after running mix skylight.fetch, the error is: "Run mix skylight.fetch"

@Dreamer009
Copy link

Dreamer009 commented Jul 13, 2017

I had this same issue. In looking at the compile message it was only compiling one file. I looked into it a bit more and found out a few things. The skylight package mix.exs file has a elixirc_paths call that checks SkylightBootstrap.artifacts_already_exist? Depending on that call it can compile additional files needed to boot the server. Looking into that further I found that the default path they are looking for the artifacts in the compile step are under /deps/skylight/tmp

If you run mix skylight.fetch from your root project folder the artifacts are placed under /tmp As you can see there is a directory mismatch.

I was able to get around this by:

cd deps/skylight
mix deps.get
mix skylight.fetch
cd ../..
mix deps.compile skylight
mix phoenix.server

@wagenet
Copy link
Contributor

wagenet commented Jul 13, 2017

@Dreamer009 if you're up for it, a PR to fix this would be awesome

@fbjork
Copy link
Author

fbjork commented Nov 24, 2017

@wagenet @Dreamer009 any update on this issue? Would love to start using this library in production to monitor our Elixir apps.

@wagenet
Copy link
Contributor

wagenet commented Nov 29, 2017

@fbjork right now we don't have any Elixir devs on our team. We'd still love to get this working, but haven't had any spare time to attempt to figure this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants