This question is locked. New answers and comments are not allowed.
                        
                        Hi All
I am having a bit of trouble implementing the Everlive SDK into my already existing project, in which I already use require and jquery.
I tried several ways of implementing, all resulting into errors with 'empty defines' or script errors according to require.
So this is what I use:
- require 2.1.15
- underscore 1.7.0
- everlive.all.min.js
- jquery 2.1.3
- backbone 1.1.2
and also some other scripts.
I am calling a require config file and cordova in the HTML like this:
 
my require config file looks like this:
 
 
 
 
 
 
 
When I run this script I will see this in the console:
Error: Script error for: Everlive
And this is wat require has to say about this error: http://requirejs.org/docs/errors.html#scripterror
After this error the script will stop working and
Now I can't solve this issue, since I didn't create the Everlive script.
So I did download the SDK files seperately and tried to implement them. Just like explained here:
http://docs.telerik.com/platform/backend-services/development/javascript-sdk/introduction
First I tried this without the use of the require config:
As I already use underscore and load this with require, I don't need to implement underscore.
This however results into these errors:
- Error: Mismatched anonymous define() module (rsvp.min.js)
- Error: Mismatched anonymous define() module: function (c){b(c)}
- Error: Load timeout for modules: underscore
Hence these are all errors comming from require.js
Then I tried this to see if these errors are still there if I load these before require:
 
 
 
This will however result into these errors:
- Error: Mismatched anonymous define() module: function (i,h,f,g){return(b.Everlive=c(i,h,f,g))}
- Error: Script error for: Everlive
Both are issues within Everlive.min.js
I tried to implement everlive.min.js before I call require / underscore etc.
This results into an error for kendo.data.everlive.min.js: Error: Mismatched anonymous define() module: function (c){b(c)}
I thought this might have something to do with not loading kendo.mobile.min.js so I placed this one into my html file.
Now I have two errors however:
kendo.mobile.min.js = ReferenceError: jQuery is not defined
kendo.data.everlive.min.js = Error: Mismatched anonymous define() module: function (c){b(c)}
As I am already using jQuery (using $) there is no need for Kendo to be calling jQuery.
Don't know how to fix this one, don't want to be using 2 versions of jquery for this.
Doing this will only result into the Kendo jQuery issue:
 
Also when running something like: el = new Everlive();
there will be other issues, for instance because underscore is not loaded before everlive was loaded.
So this is also not a real solution.
So I am really out of ideas does anyone have a better solution for implementing Everlive when you are already using jquery, underscore and require?
   
                                I am having a bit of trouble implementing the Everlive SDK into my already existing project, in which I already use require and jquery.
I tried several ways of implementing, all resulting into errors with 'empty defines' or script errors according to require.
So this is what I use:
- require 2.1.15
- underscore 1.7.0
- everlive.all.min.js
- jquery 2.1.3
- backbone 1.1.2
and also some other scripts.
I am calling a require config file and cordova in the HTML like this:
<script src="js/vendors/require.js" data-main="./js/app/config/require-config.js" type="text/javascript"></script><br>    <script src="cordova.js" type="text/javascript"></script>my require config file looks like this:
require.config({
    baseUrl: './js',    paths: {        main: './app/main',        underscore: './vendors/underscore-min',        jquery: './vendors/jquery-2.1.3.min',        backbone: './vendors/backbone-min',        handlebars: './vendors/handlebars-v2.0.0',        router: './app/routers/main-router',      everlive: './vendors/everlive.all.min'
    },    shim: {        underscore: {            deps: [],            exports: 'underscore'        },        jquery: {            deps: ['underscore'],            exports: 'jquery'        },        backbone: {            deps: ['jquery'],            exports: 'backbone'        },        router: {            deps: ['backbone'],            exports: 'router'        },        handlebars: {            deps: ['backbone'],            exports: 'handlebars'        },        everlive: {
            deps: ['backbone'],            exports: 'everlive'        },        main: {            deps: ['everlive'],            exports: 'main'        }    }});// Start the application.require(['main']);When I run this script I will see this in the console:
Error: Script error for: Everlive
And this is wat require has to say about this error: http://requirejs.org/docs/errors.html#scripterror
After this error the script will stop working and
Now I can't solve this issue, since I didn't create the Everlive script.
So I did download the SDK files seperately and tried to implement them. Just like explained here:
http://docs.telerik.com/platform/backend-services/development/javascript-sdk/introduction
First I tried this without the use of the require config:
<script src="js/reqwest.min.js"></script>    <script src="js/rsvp.min.js"></script>    <!-- script src="js/underscore.min.js"></script-->    <script src="js/everlive.min.js"></script>    <script src="js/kendo.data.everlive.min.js"></script>As I already use underscore and load this with require, I don't need to implement underscore.
This however results into these errors:
- Error: Mismatched anonymous define() module (rsvp.min.js)
- Error: Mismatched anonymous define() module: function (c){b(c)}
- Error: Load timeout for modules: underscore
Hence these are all errors comming from require.js
Then I tried this to see if these errors are still there if I load these before require:
<script src="js/reqwest.min.js"></script>   <script src="js/rsvp.min.js"></script>   <script src="js/vendors/require.js" data-main="./js/app/config/require-config.js" type="text/javascript"></script>   <script src="cordova.js" type="text/javascript"></script>   <!-- script src="js/underscore.min.js"></script-->   <script src="js/everlive.min.js"></script>   <script src="js/kendo.data.everlive.min.js"></script>This will however result into these errors:
- Error: Mismatched anonymous define() module: function (i,h,f,g){return(b.Everlive=c(i,h,f,g))}
- Error: Script error for: Everlive
Both are issues within Everlive.min.js
I tried to implement everlive.min.js before I call require / underscore etc.
This results into an error for kendo.data.everlive.min.js: Error: Mismatched anonymous define() module: function (c){b(c)}
I thought this might have something to do with not loading kendo.mobile.min.js so I placed this one into my html file.
Now I have two errors however:
kendo.mobile.min.js = ReferenceError: jQuery is not defined
kendo.data.everlive.min.js = Error: Mismatched anonymous define() module: function (c){b(c)}
As I am already using jQuery (using $) there is no need for Kendo to be calling jQuery.
Don't know how to fix this one, don't want to be using 2 versions of jquery for this.
Doing this will only result into the Kendo jQuery issue:
<script src="js/reqwest.min.js"></script>    <script src="js/rsvp.min.js"></script>    <script src="js/everlive.min.js"></script>    <script src="js/kendo.mobile.min.js"></script>    <script src="js/kendo.data.everlive.min.js"></script>    <script src="js/vendors/require.js" data-main="./js/app/config/require-config.js" type="text/javascript"></script>    <script src="cordova.js" type="text/javascript"></script>Also when running something like: el = new Everlive();
there will be other issues, for instance because underscore is not loaded before everlive was loaded.
So this is also not a real solution.
So I am really out of ideas does anyone have a better solution for implementing Everlive when you are already using jquery, underscore and require?
