Can't import the named export 'ɵɵngDeclareNgModule' from non EcmaScript module (only default export is available)

11.6k Views Asked by At

I am getting this error while using angular 11.0 with native script and android (on importing webcam module to app.module from npm):

Error: ./node_modules/ngx-webcam/fesm2015/ngx-webcam.mjs 482:20-42
Can't import the named export 'ɵɵngDeclareNgModule' from non EcmaScript module (only default export is available)
1

There are 1 best solutions below

0
rama rangeswara reddy On

I solved the above error by migrating my angular application cli version from 11.0 to 12.2.16 (or latest stable version ). After that, camera feature was working fine