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

Angular report viewer and rollup

2 Answers 196 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mario
Top achievements
Rank 1
Mario asked on 09 Jan 2018, 05:44 AM

I am getting the following error when trying to use rollup to bundle my app which is using the Angular report viewer module:

 

?   'ReportViewer' is not exported by node_modules\@progress\telerik-angular-report-viewer\dist\dependencies\telerikReportViewer.js
https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
node_modules\@progress\telerik-angular-report-viewer\dist\es\telerik-report-viewer.component.js (6:9)
4: window.jQuery = jquery;
5: import '../dependencies/telerikReportViewer.kendo-2016.3.914.min';
6: import { ReportViewer } from '../dependencies/telerikReportViewer';
            ^
7: var TelerikReportViewerComponent = /** @class */ (function () {
8:     function TelerikReportViewerComponent() {

 

I followed the link in the error description but am not sure what to put in the commonjs section of rollup.config (if this is the issue), this didn't seem to do anything:

    plugins: [
        nodeResolve({jsnext: true, module: true}),
        commonjs({
            include: 'node_modules/**', 
namedExports: {
                'chart.js': ['Chart'], 
                '@progress/telerik-angular-report-viewer': ['ReportViewer']
}, 
        }),
        uglify()
    ]

2 Answers, 1 is accepted

Sort by
0
Katia
Telerik team
answered on 11 Jan 2018, 03:18 PM
Hello Mario,

I am not so familiar with configurations specifics when using rollup. We had a similar issue reported recently, it seems that it also was related to the usage of rollup plugin. Check out this issue logged for rollup plugin, it looks like an issue with configuration of rollup-plugin-commonjs.
There are more similar issues which you can look up in the 
rollup github repository. I am not sure which one of those is relevant to you as I do not know details of your setup.

In case the issue persists you can send us a sample that reproduces it in a support ticket so we can test it locally and provide you further suggestions.


Regards,
Katia
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Mario
Top achievements
Rank 1
answered on 11 Jan 2018, 11:04 PM
Thanks for the reply but none of the suggestions helped. I have submitted a support ticket.
Tags
General Discussions
Asked by
Mario
Top achievements
Rank 1
Answers by
Katia
Telerik team
Mario
Top achievements
Rank 1
Share this question
or