1

Whenever I tried to build my project using

ng build

I come up with the following error .

An unhandled exception occured: Named export 'CUSTOM_ELEMENTS_SCHEMA' not found. The requested module '@angular/compiler' is a commonjs module which may not support all module.exports asnamed exports. Common JS modules can always be imported via the default export, for example using
import pkg from '@angular/compiler' const {CUSTOM_ELEMENTS_SCHEMA,NO_ERRORS_SCHEMA}=pkg;

I found some suggestion on SO community regarding this as some of users already faced this situation but it didn't work for me.

I tried this solution, but it doesn't work for me

https://stackoverflow.com/a/40407697/5729812

Here is screenshot of

package.json

Any thoughts or suggestion would be very helpful.

Virender Thakur
  • 421
  • 7
  • 23

0 Answers0