machty / emblem.js

Emblem.js - Ember-friendly, indented syntax alternative for Handlebars.js
http://emblemjs.com
MIT License
1.04k stars 81 forks source link

Barber::PrecompilerError with handlebars 1.1.1 #107

Closed fwoeck closed 10 years ago

fwoeck commented 10 years ago

Hi, is emblem.js currently supposed to work with handlebars 1.1.1?

I'm seeing this

Pre compilation failed for: = outlet

. Compiler said: TypeError: Cannot read property '3' of undefined
  (in ../assets/javascripts/templates/account.js.emblem)

but I'm unsure how to diagnose it further, as there's no "3" close to that context. Maybe it's a barber issue? I opened a similar question there.

mahasamatman commented 10 years ago

Same issue appeared after update to Ember 1.2.0 which depends on Handlebars 1.1.1

machty commented 10 years ago

I'm mega busy, will try to take a look at this ASAP, but would appreciate any help I can get narrowing down where exactly the breakage stems from...

listrophy commented 10 years ago

I was experiencing this problem, too.

As of November 25th, handlebars-source has a 1.1.2 version out, and it seems to fix the issue.

thenickcox commented 10 years ago

@listrophy, I just pulled down the ember starter kit. Here are my versions:

DEBUG: -------------------------------
DEBUG: Ember      : 1.2.0
DEBUG: Handlebars : 1.1.2
DEBUG: jQuery     : 1.10.2
DEBUG: -------------------------------

And just got emblem off of master, and I'm seeing this same issue. When you say it fixes it, were you able to get these versions to work?

listrophy commented 10 years ago

@thenickcox exact same versions.

Relevant gems from Gemfile.lock:

barber (0.4.2)
barber-emblem (0.1.1)
ember-source (1.2.0.1)
emblem-rails (0.2.0)
emblem-source (0.3.4)
handlebars-source (1.1.2)

Note: the console lists 1.2.0 as the Ember version despite actually being 1.2.0.1

cryptoquick commented 10 years ago

I'm getting this same error. First for {{outlet}}, then once that's wrapped in a div, this error: Warning: Cannot read property '3' of undefined I'm using the latest ember-app-kit as well.

briarsweetbriar commented 10 years ago

As a quick fix, I was able to get things working again by downgrading ember and handlebars:

ember-source (1.2.0.beta.3)
handlebars-source (1.0.12)
joshsmith commented 10 years ago

I'm also having this issue with = outlet. Downgrading as per @timothythehuman fixes it temporarily.

nixme commented 10 years ago

@machty I can take a look in fixing this. Any pointers?

machty commented 10 years ago

Will take a look at this tonight

machty commented 10 years ago

The latest Handlebars has changed the AST a lot, just need to patch things up and release a new version with proper dependencies

machty commented 10 years ago

Can yall try again after bundle update emblem-source ? I think I fixed it...

janmentzel commented 10 years ago

looking good here. Thank you machty!

DEBUG: -------------------------------
DEBUG: Ember      : 1.3.0-beta.1
DEBUG: Ember Data : 1.0.0-beta.2
DEBUG: Handlebars : 1.1.2
DEBUG: jQuery     : 1.10.2
DEBUG: -------------------------------
$ bundle show | grep -E "(ember|emblem|barber|handlebars)"
  * barber (0.4.2)
  * barber-emblem (0.1.1)
  * ember-data-source (1.0.0.beta.3)
  * ember-rails (0.14.1)
  * ember-source (1.3.0.beta.1)
  * emblem-rails (0.2.1)
  * emblem-source (0.3.5)
  * handlebars-source (1.1.2)
machty commented 10 years ago

woooooooo!

Fixed by this commit

cryptoquick commented 10 years ago

Fixed my issue. Impressed by fast response, solid developer, would install package again. A+++++++++