This is a migrated thread and some comments may be shown as answers.

Issues loading latest Kendo version using requireJS

26 Answers 1244 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ron
Top achievements
Rank 1
Ron asked on 15 Jan 2016, 06:56 PM
I'm loading the Kendo framework using requireJS, it is being loaded but the global variable isn't being set (window.kendo) and it is not being injected into my modules, sample:

http://dojo.telerik.com/aPESI/2

26 Answers, 1 is accepted

Sort by
0
Ron
Top achievements
Rank 1
answered on 15 Jan 2016, 06:59 PM
I have tested with v2015.2.805 and it seems to work but can't get the same code to work with v2016.1.112
0
Ben
Top achievements
Rank 1
answered on 15 Jan 2016, 08:14 PM

Ron,

 I am having this same problem with the latest version of Kendo.  I have been using requirejs for a while with Kendo 2015.3.1111 without issues.  After pointing my app to the latest 2016.1.112 I am receiving "kendo is not defined" errors.

Ben

0
Ben
Top achievements
Rank 1
answered on 16 Jan 2016, 01:20 PM

Is this issue related to (or the same) as this issue? https://github.com/telerik/kendo-ui-core/issues/1367

Ben

0
Grzegorz
Top achievements
Rank 1
answered on 16 Jan 2016, 06:52 PM
Newest version 2016 Q1 changes AMD wrappers. RequireJS does't work properly. window.kendo is undefined while loading modules despite the fact that previously has been downloaded kendo.core
0
Petyo
Telerik team
answered on 19 Jan 2016, 12:46 PM
Hi,

the github issue link below is indeed related to the problem - please check the explanations there. 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Saikat Chatterjee
Top achievements
Rank 1
answered on 25 Jan 2016, 12:18 AM

I'm having the same problem with 2016.1.112 and the latest internal build 2016.1.118.

Both versions have the "./" removed from all internal dependencies so my guess is that RequireJS looks under the "baseUrl".

With many JS libraries in my project I have a common "baseUrl" and don't want it hijacked by any one framework. 

0
Petyo
Telerik team
answered on 27 Jan 2016, 08:52 AM
Hello Saikat,

I will provide the same response like the one in the support ticket in case other people find this forum. Maybe someone will come up with a better solution:

The naming of the modules is necessary because the commercial files we distribute are assembled by multiple modules - we had to change thad in order to address the AMD loading of the bundle files in question. Previously, we had multiple cases of people hitting obscure bugs due to multiple modules being loaded from different bundles (like kendo.all + kendo.dropdownlist for example).  

Unfortunately, this brought the necessary change of the requireJS configuration - I agree with you that using the baseUrl for the kendo libraries is not a good solution, however, this seems to be the only way for requireJS to load such named modules. 

In case you have considered this an option, I would like to point out that other, modern module loaders like Webpack and SystemJS are much more flexible, and their configuration seems much better - check this and this help article. 
 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Chennabasappa
Top achievements
Rank 1
answered on 11 Feb 2016, 06:03 AM
Hi,

We are using RequireJS to load the Kendo UI Frame Work. The same code is working with v2015.3.930 but when using the v2016.1.112 we are unable to inject 'kendo.directives' in module.We want to use v2016.1.112 as we have to use some of the new features.

Can you please provide an example that how we can use it with RequireJS.

Thanks.
0
Mike
Top achievements
Rank 1
answered on 12 Feb 2016, 08:31 AM

You guys using RequireJS, I'm curious.  Are you writing your own code as AMD modules too?  The syntax is beyond clunky, IMHO.

 

Wouldn't you be better off with something like Webpack, or SystemJS if you don't want a build step?  That would allow you write your stuff  as ES6 modules (with Babel) or CommonJS modules, but still load AMD-compliant libraries such as Kendo. 

0
Petyo
Telerik team
answered on 12 Feb 2016, 04:24 PM
Hi Mike,

I second your opinion on RequireJS vs Webpack/SystemJS. Of course, requirejs has been around for ages, so my guess is that some people are sticking to a stable solution - nothing wrong with that. 

Apart from that, we updated our RequireJS help article, and it should work as expected with the latest internals. It also covers AngularJS integration.

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Javier Sainz
Top achievements
Rank 2
answered on 24 Mar 2016, 05:04 PM

Hi

I made a gulp file based on the custom build provided by Kendo Team to create a build for RequireJS backward compatibility https://gist.github.com/FcoJavierSainz/bdf8619c190cfe3e671a

0
Devin
Top achievements
Rank 1
answered on 24 Apr 2016, 06:25 PM
[quote]Petyo said:

In case you have considered this an option, I would like to point out that other, modern module loaders like Webpack and SystemJS are much more flexible, and their configuration seems much better - check this and this help article. 
 

[/quote]

 

I've conversed with Petyo on this subject in a ticket and unfortunately systemjs does work 100% either since it will fail to gather all dependencies when bundling files.   I've forked/expanded upon a github repository here that demonstrates the problem: https://github.com/barefootdeveloper/kendo-systemjs-2016 .  For good measure I also modified 2015.3 as a working example: https://github.com/barefootdeveloper/kendo-systemjs-2015

As far as I can tell 2016.1 broke requirejs support (baseUrl configuration is not ideal as acknowledged) and suggested people move to systemjs, but systemjs isn't really fully supported either since bundling doesn't work.

I have to admit I'm rather frustrated since I've burned a ton of time trying to get 2016.1 working the way 2015.3 did and after configuring both systemjs and requirejs the end result is I'm still stuck on 2015.3, which is rather annoying since I pay for a personal (non-work reimbursed) license of Kendo UI.

Is there any method of using Kendo UI that supports both bundling and dynamic loading of modules that actually works?  Has anyone tried webpack?

0
Mike
Top achievements
Rank 1
answered on 24 Apr 2016, 10:29 PM

@Devin,

There are working Kendo+Webpack examples in my Github account - yes, the same one from which you forked your examples above!

See: https://github.com/brownieboy/kendo-webpack-systemjs

As with SystemJS, the 2016 versions of Kendo brought new problems with Webpack, see https://github.com/webpack/webpack/issues/1897.   I managed to workaround this though, as you'll see from the comments.

0
Devin
Top achievements
Rank 1
answered on 25 Apr 2016, 01:55 AM
Thanks for the reference (and for the libraries I forked to demonstrate the problem)!   I still think this highlights a big problem with the 2016.1 release, and Telerik doesn't seem to be concerned by it, yet they still highlight requirejs and system compatibility whenever requirejs is non ideal at best and systemjs is in my opinion completely broken since it can't bundle.  Http/2 still isn't far enough long to rely upon it for production.
0
Petyo
Telerik team
answered on 26 Apr 2016, 02:41 PM
Hi everyone,

I would like to assure you that we are definitely concerned about the problem. The named modules we introduced is an attempt to fit the module concept in a distribution format which was designed long ago, and meant to be used in a different way. 

The problem is discussed in details here. The main takeaway from is that the only meaningful way we can address this is to start providing an NPM distribution, as current individidual file distribution does not handle the modules concept well. 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Devin
Top achievements
Rank 1
answered on 26 Apr 2016, 11:29 PM

That's good to hear, I think it'd probably be beneficial to the community if the limitation of bundling was highlighted on systemjs's support page.  Might save someone like me that starts swap out requirejs for systemjs only to find out it doesn't support bundling :)

 

Keep on keeping on, despite my current frustration, I'm still a big fan of how much functionality I get out of kendo.

0
Petyo
Telerik team
answered on 27 Apr 2016, 07:58 AM
Hello,

SystemJS is not meant to bundle stuff in general. This is what JSPM does. However, it still looks like Webpack is more mature and used when it comes to bundling. 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Devin
Top achievements
Rank 1
answered on 10 Jul 2016, 12:35 AM
Just checking in on this issue.  It seems the latest version 2016.2.504 doesn't assist with this issue at all.
0
Petyo
Telerik team
answered on 13 Jul 2016, 06:29 AM
Hello,

we published Kendo UI in NPM format - please give it a try. 

Regards,
Petyo
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Devin
Top achievements
Rank 1
answered on 28 Jul 2016, 11:57 AM

I'm VERY happy to report that installing via NPM did allow a site using kendo to be packed down using systemjs-builder.

Thank You Thank You Thank You!

0
Will
Top achievements
Rank 1
answered on 21 Oct 2016, 05:27 PM

It would be nice if you guys provided a distribution with kendo.aspmvc.js included.  I had to create a shim in Webpack.  Not a big deal once you figure it out but just one more problem to solve during the transition.

And BTW: for anyone who has exploited the features of RequireJS, in my case RequireJS.Net, transitioning to Webpack can be done but it is not a trivial task.  I'm a week into converting a very simple ASP MVC app and there are many things (e.g. cache busting, RequireJsOptions) for which new solutions have to be found.

0
Petyo
Telerik team
answered on 25 Oct 2016, 01:37 PM
Hello,

the current NPM distribution includes kendo.aspnetmvc.js, so perhaps I am missing something. 

Regards,
Petyo
Telerik by Progress
 
Build rich, delightful, *native* Angular 2 apps with Kendo UI for Angular 2. Try it out today! Kendo UI for Angular 2 (currently in beta) is a jQuery-free toolset, written in TypeScript, designed from the ground up to offer true, native Angular 2 components.
 
0
Will
Top achievements
Rank 1
answered on 25 Oct 2016, 05:23 PM

Sorry Petyo,

I phrased it poorly.  What I meant to say was that it would be nice if it was part of the dependencies i.e. available without having to specifically include it in some way.  Upon reflection, I realize that most of those who use kendo.aspmvc.js probably do so through the UI for ASP.Net MVC interfaces.  I'm just using it in conjunction the Kendo UI Professional bits and so that I can have the data interface without using the MVC wrappers/helpers.

Cheers,

Will

0
T. Tsonev
Telerik team
answered on 27 Oct 2016, 03:23 PM
Hi,

The kendo.aspmvc.js file is specifically designed to be included as an optional dependency. The idea was to save on space and download size.

Regards,
T. Tsonev
Telerik by Progress
 
Build rich, delightful, *native* Angular 2 apps with Kendo UI for Angular 2. Try it out today! Kendo UI for Angular 2 (currently in beta) is a jQuery-free toolset, written in TypeScript, designed from the ground up to offer true, native Angular 2 components.
 
0
Evelyn
Top achievements
Rank 1
answered on 29 Mar 2018, 06:36 AM
 Upgrade angular version to 1.6,jquery to 3.1.1 and kendo to 2018.1.221.I'm trying to load kendo 2018.1.221 version using require js (version 2.1.17) but getting issue like Kendo is undefined.Previously i was using kendo 2014 ,it was working fine and even 2015 works perfectly but when i try to use 2018 kendo version its giving me issue.
0
Dimitar
Telerik team
answered on 30 Mar 2018, 02:05 PM
Hello Evelyn,

We have provided an answer in your support ticket on the same topic. I would suggest to continue our communication there in order to prevent duplication of threads. 

The suggested solution in the ticket is the following:

1) In order to require Kendo properly, the RequireJS config should be altered in the following way:
require.config({
  paths: {
  },
  shim: {
    "angular": { deps: ["jquery"] },
    "kendo.web.min": { deps: ["angular"] }
  }
});

2) The above could then be used in the following way:
require([ "angular", "kendo.web.min" ], function() {
  var app = angular.module("app", ["kendo.directives"]);
  
  app.controller("controller", ["$scope", function($scope) {
   ...

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Ron
Top achievements
Rank 1
Answers by
Ron
Top achievements
Rank 1
Ben
Top achievements
Rank 1
Grzegorz
Top achievements
Rank 1
Petyo
Telerik team
Saikat Chatterjee
Top achievements
Rank 1
Chennabasappa
Top achievements
Rank 1
Mike
Top achievements
Rank 1
Javier Sainz
Top achievements
Rank 2
Devin
Top achievements
Rank 1
Will
Top achievements
Rank 1
T. Tsonev
Telerik team
Evelyn
Top achievements
Rank 1
Dimitar
Telerik team
Share this question
or