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

NPM / Webpack doesn't seem to work

5 Answers 1238 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Travis
Top achievements
Rank 1
Travis asked on 28 Jan 2017, 04:18 AM

I've tried the example at http://docs.telerik.com/kendo-ui/third-party/webpack locally, and I'm getting the error:

Module not found: Error: Cannot resolve module 'kendo.dropdownlist' in... [my test file]

Have installed Kendo UI Professional via NPM, following this: http://docs.telerik.com/kendo-ui/intro/installation/npm#kendo-ui-professional

Not sure I can easily share the code, but in the 'node_modules' kendo folder, none of the JS files are minified.

Is there some working example of this somewhere? Not sure if it will run in the Dojo, but I'm at a loss here.

Trav

 

 

 

 

5 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 01 Feb 2017, 08:36 AM
Hello Travis,

Apologies for the delayed response.

I can confirm that there were some changes in the NPM and webpack configuration.

The Kendo UI module has to be required with require('@progress/kendo-ui').

Also, check the paths to the files in the node_modules to ensure that they are loaded correctly.

If the issue still occurs, please send the base setup in order to investigate further.

Regards,
Stefan
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data (charts) and form elements.
0
Travis
Top achievements
Rank 1
answered on 01 Feb 2017, 04:32 PM
Thanks Stefan - I was eventually able to get it to work, although I did not need to use that module name. If that's the correct way to use it, probably worth updating the info at http://docs.telerik.com/kendo-ui/third-party/webpack, but I can see now it's mentioned at http://docs.telerik.com/kendo-ui/intro/installation/npm
0
Travis
Top achievements
Rank 1
answered on 01 Feb 2017, 11:09 PM
One more Q: what's the correct syntax for requiring only one of the Kendo widgets, like Grid for example?
0
Accepted
Stefan
Telerik team
answered on 03 Feb 2017, 09:44 AM
Hello Travis,

I'm glad to hear that the configuration is already working.

As I can confirm that the current state of the documentation can be confusing due to some recent changes, I made a runnable example and add it to GitHub:

https://github.com/telerik/kendo-ui-npm-example/tree/master/javascript-webpack/pro

The example is also demonstrating how to require only a specific widget.

Regards,
Stefan
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Travis
Top achievements
Rank 1
answered on 03 Feb 2017, 04:11 PM
Awesome, thanks Stefan- that's perfect!
Tags
General Discussions
Asked by
Travis
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Travis
Top achievements
Rank 1
Share this question
or