How to fix require() of ES Module /dir/node_modules/@angular/core/fesm2015/core.mjs not supported

225 Views Asked by At

On VsCode, I included Quokka.js extension. I tried running it on a typescript file and received the following error:

require() of ES Module /project/node_modules/@angular/core/fesm2015/core.mjs not supported. 
Instead change the require of /project/node_modules/@angular/core/fesm2015/core.mjs to a dynamic import() which is available in all CommonJS modules. 
  ​​​​​at ​​​​​​​​Object.<anonymous>​​​ ​libs/features/orders/src/lib/components/order-list.component.ts:1

An Nx monorepo is used for this project. Which error is this, and how do I fix it?

0

There are 0 best solutions below