I did upgrade my app from Angular 12.x to version 13.x
Build and Serve etc. work fine. But when I try to execute e2e-test I face following error:
E/launcher - Error: /Users/userName/PROJECT_NAME/node_modules/read-mail/
fesm2015/read-mail.mjs:1
import * as i0 from '@angular/core';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at wrapSafe (internal/modules/cjs/loader.js:979:16)
at Module._compile (internal/modules/cjs/loader.js:1027:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (/Users/userName/PROJECT_NAME/node_modules/coffeescript/
lib/coffee-script/register.js:45:36)
I have been searching and trying couple of fixes.. None of them did help. I also didn't a specific reference to such error on the GitHub Repo of the Angular community.
Any hint or idea what could cause such error? Is it an issue with Angular version 13.x?
Add this flag into your
tsconfig.jsonfile, undercompilerOptionsThis solved that issue for me