error on custom build 1.7.3/1.8 - cannot read property "copyright"

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

error on custom build 1.7.3/1.8 - cannot read property "copyright"

salinaale
Hi,
i'm trying to migrate a big project from dojo 1.7.2 to 1.8.
My project uses custom layers optimized with closure.

When i run my custom build i always get the following error:

     [exec] js: "<eval'ed string>#1(Function)#1(eval)", line 308: uncaught JavaScript runtime exception: TypeError: Cannot read property "copyright" from undefined
     [exec]     at <eval'ed string>#1(Function)#1(eval):308
     [exec]     at <eval'ed string>#1(Function)#1(eval):127
     [exec]     at <eval'ed string>#1(Function)#1(eval):106
     [exec]     at <eval'ed string>#1(Function)#1(eval):320
     [exec]     at <eval'ed string>#1(Function)#1(eval):70
     [exec]     at <eval'ed string>#1(Function)#1(eval):319
     [exec]     at <eval'ed string>#1(Function)#1(eval):127
     [exec]     at <eval'ed string>#1(Function)#1(eval):226
     [exec]     at <eval'ed string>#1(Function)#1(eval):178
     [exec]     at <eval'ed string>#1(Function)#1(eval):157
     [exec]     at <eval'ed string>#1(Function)#1(eval):208
     [exec]     at <eval'ed string>#1(Function)#1(eval):306
     [exec]     at <eval'ed string>#1(Function)#1(eval):127
     [exec]     at <eval'ed string>#1(Function)#1(eval):178
     [exec]     at <eval'ed string>#1(Function)#1(eval):178
     [exec]     at <eval'ed string>#1(Function)#1(eval):180
     [exec]     at <eval'ed string>#1(Function)#1(eval):180
     [exec]     at <eval'ed string>#1(Function)#1(eval):279
     [exec]     at <eval'ed string>#1(Function)#1(eval):249 (doBuild)
     [exec]     at <eval'ed string>#1(Function)#1(eval):284
     [exec]     at <eval'ed string>#1(Function)#1(eval):84

It seems that this error occurs when the build try to process my first layer.

If i execute a custom build using dojo 1.7.2 all seems ok.

this is my profile.js

var profile = {    
    basePath: "../",
    cssOptimize: "comments",
    optimize: "closure",
    layerOptimize: "closure",
    hasReport: true,    
    packages:[
        {
            name: "dojo",
            location: "./dojo"
        },
        {
            name: "dijit",
            location: "./dijit"
        },
        {
            name: "dojox",
            location: "./dojox"
        },
        {
           name: "mymodule",
           location: "./mymodule"
        }
    ],

    layers: {            
        "layer/first" : {
          include: [
            "dojo/date/locale",
            "dojo/io/iframe",
            "dojo/NodeList-fx",
            "dojo/NodeList-traverse",
            "dijit/Dialog",
            "mymodule/util"
          ]
        }
  }
};


Any suggestions?
Thanks,
Ale
Reply | Threaded
Open this post in threaded view
|

Re: error on custom build 1.7.3/1.8 - cannot read property "copyright"

Anton Krasovsky
I had similar issue, the problem turned out to be some CVS relate
files in my source tree. Copy your sources somewhere else and try to
remove any unrelated files/directories from source tree and see if it
builds.

Anton

On Fri, Aug 10, 2012 at 3:27 PM, salinaale <[hidden email]> wrote:

> Hi,
> i'm trying to migrate a big project from dojo 1.7.2 to 1.8.
> My project uses custom layers optimized with closure.
>
> When i run my custom build i always get the following error:
>
>      [exec] js: "<eval'ed string>#1(Function)#1(eval)", line 308: uncaught
> JavaScript runtime exception: TypeError: Cannot read property "copyright"
> from undefined
>      [exec]     at <eval'ed string>#1(Function)#1(eval):308
>      [exec]     at <eval'ed string>#1(Function)#1(eval):127
>      [exec]     at <eval'ed string>#1(Function)#1(eval):106
>      [exec]     at <eval'ed string>#1(Function)#1(eval):320
>      [exec]     at <eval'ed string>#1(Function)#1(eval):70
>      [exec]     at <eval'ed string>#1(Function)#1(eval):319
>      [exec]     at <eval'ed string>#1(Function)#1(eval):127
>      [exec]     at <eval'ed string>#1(Function)#1(eval):226
>      [exec]     at <eval'ed string>#1(Function)#1(eval):178
>      [exec]     at <eval'ed string>#1(Function)#1(eval):157
>      [exec]     at <eval'ed string>#1(Function)#1(eval):208
>      [exec]     at <eval'ed string>#1(Function)#1(eval):306
>      [exec]     at <eval'ed string>#1(Function)#1(eval):127
>      [exec]     at <eval'ed string>#1(Function)#1(eval):178
>      [exec]     at <eval'ed string>#1(Function)#1(eval):178
>      [exec]     at <eval'ed string>#1(Function)#1(eval):180
>      [exec]     at <eval'ed string>#1(Function)#1(eval):180
>      [exec]     at <eval'ed string>#1(Function)#1(eval):279
>      [exec]     at <eval'ed string>#1(Function)#1(eval):249 (doBuild)
>      [exec]     at <eval'ed string>#1(Function)#1(eval):284
>      [exec]     at <eval'ed string>#1(Function)#1(eval):84
>
> It seems that this error occurs when the build try to process my first
> layer.
>
> If i execute a custom build using dojo 1.7.2 all seems ok.
>
> this is my profile.js
>
> var profile = {
>     basePath: "../",
>     cssOptimize: "comments",
>     optimize: "closure",
>     layerOptimize: "closure",
>     hasReport: true,
>     packages:[
>         {
>             name: "dojo",
>             location: "./dojo"
>         },
>         {
>             name: "dijit",
>             location: "./dijit"
>         },
>         {
>             name: "dojox",
>             location: "./dojox"
>         },
>         {
>            name: "mymodule",
>            location: "./mymodule"
>         }
>     ],
>
>     layers: {
>         "layer/first" : {
>           include: [
>             "dojo/date/locale",
>             "dojo/io/iframe",
>             "dojo/NodeList-fx",
>             "dojo/NodeList-traverse",
>             "dijit/Dialog",
>             "mymodule/util"
>           ]
>         }
>   }
> };
>
>
> Any suggestions?
> Thanks,
> Ale
>
>
>
> --
> View this message in context: http://dojo-toolkit.33424.n3.nabble.com/error-on-custom-build-1-7-3-1-8-cannot-read-property-copyright-tp3988444.html
> Sent from the Dojo Toolkit mailing list archive at Nabble.com.
> ________________________________________________________
> Dojotoolkit: http://dojotoolkit.org
> Reference Guide: http://dojotoolkit.org/reference-guide
> API Documentation: http://dojotoolkit.org/api
> Tutorials: http://dojotoolkit.org/documentation
>
> [hidden email]
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: error on custom build 1.7.3/1.8 - cannot read property "copyright"

Rubbinio
In reply to this post by salinaale
We had the same problem and fixed it by excluding the CVS folder like this:

 trees : [
                    [
                            ".",
                            ".",
                            /(\/\.)|(~$)|(CVS)/
                    ]
            ]
Reply | Threaded
Open this post in threaded view
|

Re: error on custom build 1.7.3/1.8 - cannot read property "copyright"

rnedwick
We are having the same problem and do not have any CVS folders in our directory structure.  I removed our custom modules and dgrid related modules from our build and tried to build a simple layer using dijit resources only, and the build still fails with the same error.

My profile.js is below.  Is there any way to trigger the build to run in a "verbose" mode so that it identifies/highlights the file(s) that it is processing at the time of the failure as an aid to try to debug what the problem is?

Thanks,
Robb

 var profile = {
      action:"release",
      basePath: "../../webapps/xeWebApp/xeWeb.war/scripts/",
      optimize:"closure",
      layerOptimize: "closure",
      releaseDir: "./release",
      releaseName: "6.5",
      version: "6.5",
      hasReport: true,

      packages:[
          {
              name: "dojo",
              location: "./dojo-release-1.8.0-src/dojo"
          },
          {
              name: "dijit",
              location: "./dojo-release-1.8.0-src/dijit"
          }

      ],
      layers: {
          "6.5/layers/core-dijit": {
              include: [
                  "dijit/_base/focus",
                  "dijit/_Widget",
                  "dijit/_Templated",
                  "dijit/_Container",
                  "dijit/_DialogMixin",
                  "dijit/Calendar",
                  "dijit/Dialog",
                  "dijit/DropDownMenu",
                  "dijit/form/_FormMixin",
                  "dijit/form/_FormWidget",
                  "dijit/form/Button",
                  "dijit/form/CheckBox",
                  "dijit/form/_DateTimeTextBox",
                  "dijit/form/DateTextBox",
                  "dijit/form/DropDownButton",
                  "dijit/form/FilteringSelect",
                  "dijit/form/ComboBox",
                  "dijit/form/NumberTextBox",
                  "dijit/form/TextBox",
                  "dijit/form/ValidationTextBox",
                  "dijit/layout/_LayoutWidget",
                  "dijit/layout/BorderContainer",
                  "dijit/layout/ContentPane",
                  "dijit/layout/TabContainer",
                  "dijit/Menu",
                  "dijit/Toolbar",
                  "dijit/ToolbarSeparator"
              ]
          }
      },
     optimizeCss:"optimize"
  }
Reply | Threaded
Open this post in threaded view
|

Re: error on custom build 1.7.3/1.8 - cannot read property "copyright"

salinaale
I do the same but without any result....
I removed all SVN directories, i delete our module and create a simple layer only with dojo/dijit resouces but build still fails.
Thanks.
Ale
Reply | Threaded
Open this post in threaded view
|

Re: error on custom build 1.7.3/1.8 - cannot read property "copyright"

salinaale
In reply to this post by salinaale
i've modified the js file under util/build/transforms/writeOptimized.js (line 294) and i replaced 'resource.layer.copyright' with ''... now i'm able to build my project, but this is not a solution....:(
Any suggestions?? where i'm wrong?

Thanks.
Ale
Reply | Threaded
Open this post in threaded view
|

Re: error on custom build 1.7.3/1.8 - cannot read property "copyright"

rnedwick

I tried making this change to writeOptimized.js to see if it helped at all, and I still have the problem trying to output my custom layers.

Does anyone have any other suggestions on how to debug this further?  

My build configuration above wasn't even including any custom components but was just grabbing the standard dijit components and it failed for me when building on both Linux and Windows.

Thanks,
Robb
Reply | Threaded
Open this post in threaded view
|

Re: error on custom build 1.7.3/1.8 - cannot read property "copyright"

rnedwick
In reply to this post by salinaale
So looking at this more, I found that for me, the problem was also in writeOptimized.js, but it was on line 308 with the reference to resource.pack.copyright.  The resource being processed at the time of the failure is a internationalization resource for the "ar" locale from the dijit package (resource.pack does not exist at the time the build gets to this point for this resource).

I resolved the error by changing the resource.pack.copyright reference to a conditional: "resource.pack ? resource.pack.copyright : bc.copyright"

I'm not sure if this is a valid solution or not, but it gets me past the immediate problem of not being able to create custom layers.  

Thanks,
Robb
Reply | Threaded
Open this post in threaded view
|

Re: error on custom build 1.7.3/1.8 - cannot read property "copyright"

salinaale
Hi,
anyone has found a valid solution? any news? i've tried also to checkout dojo from snv trunk but i got always the same problem of 'copyright'... where i'm wrong?

Thanks,
Ale
Reply | Threaded
Open this post in threaded view
|

Re: error on custom build 1.7.3/1.8 - cannot read property "copyright"

rcgill
Please take a look at comment 4 here http://trac.dojotoolkit.org/ticket/16106 re excluding files.

I can't duplicate the NLS issue; please follow http://trac.dojotoolkit.org/ticket/16655 for that problem.

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: error on custom build 1.7.3/1.8 - cannot read property "copyright"

prosp4300
I found this problem could happen for 1.9 due to other errors

So before dive to this "copyright" undefined issue, it would be better to fix other reported errors first

Hope this helps