7

I want to use yeoman to generate an angular app structure, but an error stopped me.

yo-->Angular Bootstrap-->more options-->

error occurs:

Possibly unhandled Template render error: (unknown path) [Line 3, Column 90]
  expected variable end
    at Object.exports.withPrettyErrors (/usr/lib/node_modules/generator-angular-bootstrap/node_modules/nunjucks/src/lib.js:33:17)
    at Obj.extend.render (/usr/lib/node_modules/generator-angular-bootstrap/node_modules/nunjucks/src/environment.js:344:20)
    at Obj.extend.renderString (/usr/lib/node_modules/generator-angular-bootstrap/node_modules/nunjucks/src/environment.js:231:21)
    at Generator.engine [as _engine] (/usr/lib/node_modules/generator-angular-bootstrap/app/modules/nunjucks-engine.js:17:14)
    at Generator.engine (/usr/lib/node_modules/generator-angular-bootstrap/node_modules/yeoman-generator/lib/actions/actions.js:314:10)
    at Generator.template (/usr/lib/node_modules/generator-angular-bootstrap/node_modules/yeoman-generator/lib/actions/actions.js:289:15)
    at setupAppFiles (/usr/lib/node_modules/generator-angular-bootstrap/app/index.js:209:10)
    at tryCatch1 (/usr/lib/node_modules/generator-angular-bootstrap/node_modules/bluebird/js/main/util.js:45:21)
    at Promise$_callHandler [as _callHandler] (/usr/lib/node_modules/generator-angular-bootstrap/node_modules/bluebird/js/main/promise.js:658:13)
    at Promise$_settlePromiseFromHandler [as _settlePromiseFromHandler] (/usr/lib/node_modules/generator-angular-bootstrap/node_modules/bluebird/js/main/promise.js:672:18)

So, anyone can help me?

creeper
  • 499
  • 2
  • 17
  • 1
    I am also having this same issue. –  Oct 31 '14 at 14:04
  • Are you on a mac. If so, I might at least have tracked down the source of the issue. –  Oct 31 '14 at 14:13
  • In file included from ../fsevents.cc:86: ../src/constants.cc:10:66: warning: template argument uses unnamed type [-Wunnamed-type-template-args] object->Set(NanNew("kFSEventStreamEventFlagNone"), NanNew(kFSEventStreamEventFlagNone)); –  Oct 31 '14 at 14:14
  • The above appears to come from the nunjucks module...whatever that is. :) –  Oct 31 '14 at 14:15
  • When then seems to be an issue coming from here....the maintainer of that code base closed the issue as fixed...but as we can see...it is not. :) https://github.com/pipobscure/fsevents/issues/33 –  Oct 31 '14 at 14:35
  • My os is `Ubuntu 14.04.1 LTS`. – creeper Nov 01 '14 at 03:07
  • 3
    https://github.com/mgcrea/generator-angular-bootstrap/issues/18 – Heikki Nov 02 '14 at 23:57

3 Answers3

10

I've "solved" by downgrading the version from 0.5.1 to 0.4.3:

$ sudo npm uninstall -g generator-angular-bootstrap
$ sudo npm install -g generator-angular-bootstrap@0.4.3
$ yo angular-bootstrap

This error seems to be related to nunjucks -- which was introduced in version 0.5.0 (I've experienced the error in 0.5.0 and 0.5.1); and probably related to something else I couldn't identify quickly.

thicolares
  • 295
  • 3
  • 14
  • 2
    I'd give this a green check mark if I could. Thanks! – totallytotallyamazing Jan 27 '16 at 16:37
  • That worked! There seems to be more and more confusion and discrepancy between packages within the yeoman generator sphere; one now discover "problems" like the above *all* *the* *time*. The whole point was to automatize such trivial tasks, but now we have the huge task to figure out and recover from various grunt / yeoman / generator failures instead :( – davidkonrad Mar 21 '17 at 11:59
0

delete /usr/lib/node_modules and install all dependencies again following this tutorial: http://yeoman.io/codelab/setup.html

After that you could run "yo angular" and choose Bootstrap as one of dependecies.

jirka
  • 111
  • 1
  • 6
  • Thank you for the answer. Unfortunately this does not work. 'yo angular' has always worked just fine. the issue is when trying to run 'yo angular-bootstrap' which apparently has a different type of scaffolding mechanism. –  Nov 04 '14 at 14:46
0

I dont know you got the answer, but you can probably go with default project generation, which has bootstrap itself.

Naveen
  • 830
  • 9
  • 19
  • Thank you for the answer. Unfortunately this does not work. 'yo angular' has always worked just fine. the issue is when trying to run 'yo angular-bootstrap' which apparently has a different type of scaffolding mechanism. And the reason for wanting to use this scaffold is it provides an option to support angular on IE<9. –  Nov 06 '14 at 19:58