Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

Error while packaging (define("desktop", function(){}); }()); has no method 'substring'] }) #51

Open
rajeev-tripathi opened this issue May 19, 2015 · 0 comments

Comments

@rajeev-tripathi
Copy link

Hi @gfranko ,
I cloned this repository and tried making a sample app (followed every step as mentioned). Few changes that I made was:

  1. Moved the embedded script from index.html to main.js
  2. Added 'MobileView' under views folder
  3. The application worked fine, however when tried packaging the same using 'grunt' command I got this message at the end:
    // DesktopInit.js
    // --------------
    // Includes Desktop Specific JavaScript files here (or inside of your Desktop
    router)
    require(["jquery", "backbone", "routers/DesktopRouter", "jqueryui", "bootstrap", "backbone.validateAll"],
    function($, Backbone, DesktopRouter) {
    // Instantiates a new Desktop Router instance
    new DesktopRouter();
    }
    );
    define("desktop", function(){});
    }()); has no method 'substring'] }

Even after this, I tried to switch to the production version by setting 'production' var to true. But when opened the app in chrome, it threw an error(Uncaught ReferenceError: define is not defined).

I am on windows environment(Win 7 64-bit OS) and having below tools installed:

  1. node (v 0.10.33)
  2. grunt-cli v0.1.13, grunt v0.4.5

This revolves only around grunt packaging. Rest of the instruction and my sample app ran correctly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant