Skip to content

"cdk-table-exporter" warning with "xlsx" #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
NevenLiang opened this issue Nov 23, 2021 · 4 comments
Open

"cdk-table-exporter" warning with "xlsx" #133

NevenLiang opened this issue Nov 23, 2021 · 4 comments

Comments

@NevenLiang
Copy link

Warning: 
[PROJECT_PATH]/node_modules/cdk-table-exporter/__ivy_ngcc__/fesm2015/cdk-table-exporter.js depends on 'xlsx'. 
CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Warning: 
[PROJECT_PATH]/node_modules/cdk-table-exporter/__ivy_ngcc__/fesm2015/cdk-table-exporter.js depends on 
'xlsx/dist/xlsx.mini.min'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

I am using Angular 12 and mat-table-exporter 10.2.3.

@jules1091
Copy link

Same with Angular 13 and mat-table-exporter 10.2.4

@CamClark1995
Copy link

You can silence this warning by adding the following to your angular.json file under "builder": "@angular-devkit/build-angular:browser":

"allowedCommonJsDependencies": [
"xlsx"
]

@HalitTalha
Copy link
Owner

This is an unavoidable warning for now. Thanks, @CamClark1995, for sharing how to silence the warning.

@vasudevaraopaila
Copy link

Hi, to fix the snyk issue in mat table exporter package due to the xlsx dependency,I have published two packages to replacing mat table exporter and cdk table exporter(copied from these two and changed names), and added @e965/xlsx as a dependency for cdk table exporter. But the compilation is failing by throwing the below issues.

./node_modules/config-table-exporter/fesm2020/cdk-table-exporter.mjs:130:21-54 - Error: Module not found: Error: Can't resolve 'xlsx/dist/xlsx.mini.min' in 'D:\Projects\Config Hub\ba-configHub-UI\Config-Hub-Main\node_modules\config-table-exporter\fesm2020'

./node_modules/config-table-exporter/fesm2020/cdk-table-exporter.mjs:132:21-35 - Error: Module not found: Error: Can't resolve 'xlsx' in 'D:\Projects\Config Hub\ba-configHub-UI\Config-Hub-Main\node_modules\config-table-exporter\fesm2020'

Adding the packages below for reference
https://www.npmjs.com/package/config-mat-table-exporter?activeTab=code
https://www.npmjs.com/package/config-table-exporter?activeTab=code

any help would be appreciated.

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

No branches or pull requests

5 participants