Configuring Lager - I get this error: undefined parse transform 'lager_transform'

7.8k Views Asked by At

I'm testing this https://github.com/saleyn/erws_example on R16B03 (both on windows & Ubuntu)

==> erws_example (compile)
src/erws_handler.erl:none: undefined parse transform 'lager_transform'
ERROR: compile failed while processing /home/charles/erws_example: rebar_abort

I've seen this suggestion http://philipcristiano.com/2013/05/27/ordering-of-rebar-dependencies.html

So far, i'm unable to get any headway.

Thanks.

2

There are 2 best solutions below

1
On BEST ANSWER

It seems rebar can not compile parse transforms before compiling everything else (https://github.com/basho/rebar/issues/270). The solution is to compile module with parse transform manually or use file-level parse_transform compiler directive instead of project level.

1
On

Try to put lager to first position in rebar dependency list. it will fix it. rebar ordering compile dependencies according to this list, not dependency tree))