Generating browser application bundles failed

Viewed 343

When I want to serve/build my Angular application, always get this error:

 Generating browser application bundles (phase: setup)...file:///Users/.../Projects/.../node_modules/@angular/compiler-cli/bundles/index.js:3221
    file: ts10.getOriginalNode(node).getSourceFile(),
                                    ^

TypeError: Cannot read properties of undefined (reading 'getSourceFile')
    at makeDiagnostic (file:///Users/.../Projects/.../node_modules/@angular/compiler-cli/bundles/index.js:3221:37)
    at FatalDiagnosticError.toDiagnostic (file:///Users/.../Projects/.../node_modules/@angular/compiler-cli/bundles/index.js:3213:12)
    at TraitCompiler.analyzeTrait (file:///Users/.../Projects/.../node_modules/@angular/compiler-cli/bundles/index.js:6675:37)
    at analyze (file:///Users/.../Projects/.../node_modules/@angular/compiler-cli/bundles/index.js:6643:34)
    at TraitCompiler.analyzeClass (file:///Users/.../Projects/.../node_modules/@angular/compiler-cli/bundles/index.js:6660:9)
    at visit2 (file:///Users/.../Projects/.../node_modules/@angular/compiler-cli/bundles/index.js:6494:14)
    at visitNodes (/Users/.../Projects/.../node_modules/typescript/lib/typescript.js:29673:30)
    at Object.forEachChild (/Users/.../Projects/.../node_modules/typescript/lib/typescript.js:29916:24)
    at visit2 (file:///Users/.../Projects/.../node_modules/@angular/compiler-cli/bundles/index.js:6496:12)
    at TraitCompiler.analyze (file:///.../Projects/.../node_modules/@angular/compiler-cli/bundles/index.js:6498:5)

I developing in Mac M1, and for now, the newest Angular CLI version is 13.0.3

I tried to remove node-modules, with package lock, and reinstall the modules multiple times, tried invalidate cache, and reinstalled angular version too, but the problem is still exists.

Somebody know what is the problem?

0 Answers
Related