Using ng-mocks 13.5.2 with jest-preset-angular 12 and @ngneat/spectator 11 I am getting the below error any time I try to use
MockPipe in my spec file.
I’m not sure why this is happening.
Must use import to load ES Module: /Users/scott/ltr/ltr/node_modules/@angular/core/fesm2020/core.mjs.
at Runtime.requireModule (node_modules/jest-runtime/build/index.js:1011:21)
at Object.WEBPACK_EXTERNAL_MODULE__8900 (node_modules/ng-mocks/webpack:/ng-mocks/webpack/universalModuleDefinition:10:19)
The issue was reported and fixed, please use the latest version of
ng-mocks: 14.0.1 or younger.
The problem was triggered by the
--experimental-vm-modules, which forces to use
imports instead of
ng-mocks hadn’t provided an
The fix was implemented here:
Answered By – satanTime
Answer Checked By – Marilyn (AngularFixing Volunteer)