Skip to content

Instantly share code, notes, and snippets.

@jessabean
Created June 5, 2014 01:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jessabean/09a4ff63455824ddb718 to your computer and use it in GitHub Desktop.
Save jessabean/09a4ff63455824ddb718 to your computer and use it in GitHub Desktop.
Ember/Emblem.js build error

In application.emblem:

header Exercism
  nav
    ul
      li
        link-to 'Explore' 'explore'

Error:

Build error

exercism/templates/application.emblem (in /Users/jessabean/Projects/src/website/tmp/static_compiler-tmp_dest_dir-5n1Er2zF.tmp)

Property 'undefined' of object # is not a function

Trace:

Property 'undefined' of object #<Object> is not a function
TypeError: Property 'undefined' of object #<Object> is not a function
  at Object.Compiler.accept (/Users/jessabean/Projects/src/website/node_modules/broccoli-emblem-compiler/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:105:26)
  at Object.Compiler.program (/Users/jessabean/Projects/src/website/node_modules/broccoli-emblem-compiler/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:118:12)
  at Object.Compiler.accept (/Users/jessabean/Projects/src/website/node_modules/broccoli-emblem-compiler/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:105:26)
  at Object.Compiler.compile (/Users/jessabean/Projects/src/website/node_modules/broccoli-emblem-compiler/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:95:17)
  at HandlebarsEnvironment.Ember.Handlebars.precompile (/Users/jessabean/Projects/src/website/node_modules/broccoli-emblem-compiler/node_modules/ember-template-compiler/vendor/ember-template-compiler.js:284:53)
  at Object.Emblem.precompile (/Users/jessabean/Projects/src/website/node_modules/broccoli-emblem-compiler/node_modules/emblem/lib/compiler.js:45:28)
  at TemplateCompiler.processString (/Users/jessabean/Projects/src/website/node_modules/broccoli-emblem-compiler/index.js:20:25)
  at TemplateCompiler.Filter.processFile (/Users/jessabean/Projects/src/website/node_modules/broccoli-emblem-compiler/node_modules/broccoli-filter/index.js:135:31)
  at Promise.resolve.then.catch.err.file (/Users/jessabean/Projects/src/website/node_modules/broccoli-emblem-compiler/node_modules/broccoli-filter/index.js:83:21)
  at tryCatch (/Users/jessabean/Projects/src/website/node_modules/broccoli-emblem-compiler/node_modules/broccoli-filter/node_modules/rsvp/dist/commonjs/rsvp/-internal.js:161:16)
  at invokeCallback (/Users/jessabean/Projects/src/website/node_modules/broccoli-emblem-compiler/node_modules/broccoli-filter/node_modules/rsvp/dist/commonjs/rsvp/-internal.js:170:17)
  at /Users/jessabean/Projects/src/website/node_modules/broccoli-emblem-compiler/node_modules/broccoli-filter/node_modules/rsvp/dist/commonjs/rsvp/promise.js:178:17
  at flush (/Users/jessabean/Projects/src/website/node_modules/broccoli-emblem-compiler/node_modules/broccoli-filter/node_modules/rsvp/dist/commonjs/rsvp/asap.js:51:9)
  at process._tickDomainCallback (node.js:459:13)

@bradcerasani
Copy link

I don't think Emblem likes you adding both raw content and nested elements to header - it may support it, but not with that syntax. Wrapping 'Exercism' in any other tag will work as intended:

header
  h1 Exercism
  nav
    ul
      li
        link-to 'Explore' 'explore'

@machty
Copy link

machty commented Aug 1, 2014

You can do

header
  | Exercism
  nav
    ul
      li
        link-to 'Explore' 'explore'

basically you can do inline text shorthand or you can use the block syntax, but not both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment