Issue when building compiled files

358 views
Skip to first unread message

Seth Buntin

unread,
Dec 16, 2010, 3:46:47 PM12/16/10
to closure-lib...@googlegroups.com
I am trying to get my namespace compile into a standalone .js file.  Here is what I am currently using

python static/js/closure/bin/build/closurebuilder.py \
    --root static/js/closure \
    --root static/js/herman \
    --namespace "herman" \
    --output_mode compiled \
    --compiler_jar ~/projects/goog/closure/closure-compiler/build/compiler.jar \
    --compiler_flags="--compilation_level=ADVANCED_OPTIMIZATIONS" \
    > static/js/herman-compiled.js

That gives me an error of:

static/js/closure/bin/build/closurebuilder.py: Scanning paths...
static/js/closure/bin/build/closurebuilder.py: 648 sources scanned.
static/js/closure/bin/build/closurebuilder.py: Building dependency tree..
Traceback (most recent call last):
  File "static/js/closure/bin/build/closurebuilder.py", line 256, in <module>
    main()
  File "static/js/closure/bin/build/closurebuilder.py", line 203, in main
    tree = depstree.DepsTree(sources)
  File "/Users/seth/projects/buntin/herman/static/js/closure/bin/build/depstree.py", line 56, in __init__
    raise NamespaceNotFoundError(require, source)
depstree.NamespaceNotFoundError: Namespace "goog.async.Deferred" never provided. Required in Source static/js/closure/goog/messaging/deferredchannel.js

I can't seem to figure out what is happening.  Can anyone help?

Seth Buntin

unread,
Dec 16, 2010, 4:04:24 PM12/16/10
to closure-lib...@googlegroups.com
I figured this out, it had something to do with the need of the third-party folder for building.

tim.m...@gmail.com

unread,
Feb 22, 2011, 9:48:53 PM2/22/11
to closure-lib...@googlegroups.com
Seth can you expand a bit on what your fix was?  Were additional command line arguments required?  I'm having a similar error. 

Nathan Wright

unread,
Feb 23, 2011, 6:51:30 PM2/23/11
to closure-lib...@googlegroups.com
This happens if you check out just the "closure" directory from the
closure-library repo. There's a "third-party" directory that's
tempting to omit, but unfortunately it's required. In other words,
pass the entire closure-library trunk as a --root argument to
closurebuilder.py and you'll be golden.

It'd be great if goog.async.Deferred could be moved out of the third-
party directory so that it could be safely omitted if you're not using
any of those components. Closure devs: any chance of that happening?

-Nathan

Seth Buntin

unread,
Feb 23, 2011, 6:54:35 PM2/23/11
to Closure Library Discuss
Well, it has been a while since I have last looked at this but
comparing the code above with what I currently use I have taken out:

--compiler_flags="--compilation_level=ADVANCED_OPTIMIZATIONS" \

Sorry if this doesn't help much.
Reply all
Reply to author
Forward
0 new messages