简体   繁体   中英

Regarding error in node modules while installing SlickGrid

While installing latest version of Slickgrid 4.1.2 with angular 12, am facing issues while building with errors such as,

ERROR in ./node_modules/angular-slickgrid/fesm2015/angular-slickgrid.mjs 2079:48-70
Can't import the named export 'ɵɵngDeclareNgModule' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/angular-slickgrid/fesm2015/angular-slickgrid.mjs 67:259-277
Can't import the named export 'ɵɵFactoryTarget' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/angular-slickgrid/fesm2015/angular-slickgrid.mjs 511:46-69
Can't import the named export 'castObservableToPromise' from non EcmaScript module (only default export is available)

I tried various things, and made sure ngx/translate package is installed, in tsconfig am using es2015 because of my other dependencies.

Please note that I'm the author of Angular-Slickgrid

Angular-Slickgrid 4.x is for Ivy/ESM build only, as it is written in Angular-Slickgrid README - Angular Compatibility , and you seem to want to stay on non-ESM/non-Ivy builds by keeping ES2015 output and so you should use previous major version of Angular-Slickgrid 3.x and with that downgrade you will also have to downgrade any packages of Slickgrid-Universal to 0.x (if you had any).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM