0

I'm using the angular-fullstack yeoman generator and the code builds on another machine I have set up. I recently got a new Mac and cloned my repo and I can't get it to build the distribution.

When I try to build the code for distribution using

grunt build

it fails the cdnify:dist task with the error "Fatal Error: builder is not defined"

My full Gruntfile.js is here

https://gist.github.com/bodagetta/ad770f7782b52a9e8fb0

Here is the relevant output from terminal

Running "concat:generated" (concat) task
File .tmp/concat/app/vendor.css created.
File .tmp/concat/app/app.css created.
File .tmp/concat/app/vendor.js created.
File .tmp/concat/app/app.js created.

Running "ngAnnotate:dist" (ngAnnotate) task
>> 2 files successfully generated.

Running "copy:dist" (copy) task
Created 197 directories, copied 1028 files

Running "cdnify:dist" (cdnify) task
Going through dist/public/index.html to update script refs
Fatal error: builder is not defined


Execution Time (2015-05-17 17:31:09 UTC)
loading tasks        75ms  ▇▇ 1%
clean:dist           97ms  ▇▇ 2%
concurrent:dist        1s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 16%
wiredep:target      197ms  ▇▇▇▇▇ 3%
useminPrepare:html  144ms  ▇▇▇ 2%
ngtemplates:main     95ms  ▇▇ 2%
concat:generated    145ms  ▇▇▇ 2%
ngAnnotate:dist      1.2s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 19%
copy:dist            1.6s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 25%
cdnify:dist          1.6s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 26%
Total 6.3s
bodagetta
  • 834
  • 8
  • 17

1 Answers1

0

I have the same problem. Locally "grunt build" goes well, but on Jenkins it fails with

"Running "cdnify:dist" (cdnify) task
Going through dist/public/index.html to update script refs
Fatal error: builder is not defined"

So for me the problem solution was in downgrading nodejs version from 0.12.2 to 0.11.14. You can check node version with "node -v" command. To easily update node version via npm use http://davidwalsh.name/upgrade-nodejs.

Domash
  • 9
  • 3