After initially starting with the classic Angular/systemjs setup for the Tour of Heroes
, I transitioned to using angular-client
. The application now performs well in both development and production modes, except for when I try to run tests using ng test
. An error is thrown not only for test.ts
, but also for polyfills.ts
.
code: 'ENOENT',
errno: 34,
message: 'no such file or directory',
path: '/_karma_webpack_/src/test.ts' }
I've been unable to pinpoint the exact cause. Even when I set up a new project using ng
, as soon as I add a component to the app-routing.module.ts
, the same error surfaces. It's likely that I overlooked something blatantly obvious, so I apologize in advance for any oversight.
If you're interested in delving deeper into the code (or attempting to run the tests): https://github.com/ckpinguin/angular-tour-of-heroes
Additional information: Prior to the aforementioned error, every component threw a similar message. It remains unclear why this occurs, especially since the application runs smoothly.
ERROR in ./src/app/heroes/hero-list.component/hero-list.component.ts
Module build failed: TypeError: Cannot read property 'getChildAt' of undefined
at refactor.findAstNodes.filter.forEach (/home/axcka01/projects/angular/tour-of-heroes/node_modules/@ngtools/webpack/src/loader.js:221:54)
at Array.forEach (native)
at _removeModuleId (/home/axcka01/projects/angular/tour-of-heroes/node_modules/@ngtools/webpack/src/loader.js:215:10)
at Promise.resolve.then.then (/home/axcka01/projects/angular/tour-of-heroes/node_modules/@ngtools/webpack/src/loader.js:298:33)
at process._tickCallback (internal/process/next_tick.js:103:7)
@ ./src/app/app.module.ts 19:30-89
@ ./src/main.ts
@ multi ./src/main.ts