While trying to run ng serve on my angular project I got below error,
- Generating browser application bundles (phase: setup)...Compiling @angular/core : es2015 as esm2015
Error: Error on worker #1: TypeError: ts.isNamedTupleMember is not a function
at StaticInterpreter.visitType (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\src\ngtsc\partial_evaluator\src\interpreter.js:699:25)
at StaticInterpreter.visitVariableDeclaration (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\src\ngtsc\partial_evaluator\src\interpreter.js:303:46)
at StaticInterpreter.visitDeclaration (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\src\ngtsc\partial_evaluator\src\interpreter.js:264:29)
at StaticInterpreter.visitAmbiguousDeclaration (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\src\ngtsc\partial_evaluator\src\interpreter.js:372:22)
at StaticInterpreter.visitIdentifier (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\src\ngtsc\partial_evaluator\src\interpreter.js:242:31)
at StaticInterpreter.visitExpression (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\src\ngtsc\partial_evaluator\src\interpreter.js:99:31)
at StaticInterpreter.visitPropertyAccessExpression (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\src\ngtsc\partial_evaluator\src\interpreter.js:342
:28)
at StaticInterpreter.visitExpression (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\src\ngtsc\partial_evaluator\src\interpreter.js:102:31)
at StaticInterpreter.visitCallExpression (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\src\ngtsc\partial_evaluator\src\interpreter.js:431:28)
at StaticInterpreter.visitExpression (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\src\ngtsc\partial_evaluator\src\interpreter.js:105:31)
at ClusterMaster.onWorkerMessage (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:195:27)
at C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:55:95
at ClusterMaster.<anonymous> (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:293:57)
at step (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\node_modules\tslib\tslib.js:143:27)
at Object.next (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\node_modules\tslib\tslib.js:124:57)
at C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\node_modules\tslib\tslib.js:117:75
at new Promise (<anonymous>)
at Object.__awaiter (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\node_modules\tslib\tslib.js:113:16)
at EventEmitter.<anonymous> (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:287:32)
at EventEmitter.emit (events.js:314:20)
C:\Workspace\SPRINGBOOT\untitled\node_modules\@ngtools\webpack\src\ngcc_processor.js:139
throw new Error(errorMessage + `NGCC failed${errorMessage ? ', see above' : ''}.`);
^
Error: NGCC failed.
at NgccProcessor.process (C:\Workspace\SPRINGBOOT\untitled\node_modules\@ngtools\webpack\src\ngcc_processor.js:139:19)
at C:\Workspace\SPRINGBOOT\untitled\node_modules\@ngtools\webpack\src\ivy\plugin.js:129:27
at Hook.eval [as call] (eval at create (C:\Workspace\SPRINGBOOT\untitled\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:26:1)
at Hook.CALL_DELEGATE [as _call] (C:\Workspace\SPRINGBOOT\untitled\node_modules\tapable\lib\Hook.js:14:14)
at Compiler.newCompilation (C:\Workspace\SPRINGBOOT\untitled\node_modules\webpack\lib\Compiler.js:1043:30)
at C:\Workspace\SPRINGBOOT\untitled\node_modules\webpack\lib\Compiler.js:1088:29
at Hook.eval [as callAsync] (eval at create (C:\Workspace\SPRINGBOOT\untitled\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:20:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\Workspace\SPRINGBOOT\untitled\node_modules\tapable\lib\Hook.js:18:14)
at Compiler.compile (C:\Workspace\SPRINGBOOT\untitled\node_modules\webpack\lib\Compiler.js:1083:28)
at C:\Workspace\SPRINGBOOT\untitled\node_modules\webpack\lib\Watching.js:200:19
C:\Workspace\SPRINGBOOT\untitled>ng serve --fix
Unknown option: '--fix'
Error: Error on worker #1: TypeError: ts.isNamedTupleMember is not a function
at StaticInterpreter.visitType (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\src\ngtsc\partial_evaluator\src\interpreter.js:699:25)
at StaticInterpreter.visitVariableDeclaration (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\src\ngtsc\partial_evaluator\src\interpreter.js:303:46)
at StaticInterpreter.visitDeclaration (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\src\ngtsc\partial_evaluator\src\interpreter.js:264:29)
at StaticInterpreter.visitAmbiguousDeclaration (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\src\ngtsc\partial_evaluator\src\interpreter.js:372:22)
at StaticInterpreter.visitIdentifier (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\src\ngtsc\partial_evaluator\src\interpreter.js:242:31)
at StaticInterpreter.visitExpression (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\src\ngtsc\partial_evaluator\src\interpreter.js:99:31)
at StaticInterpreter.visitPropertyAccessExpression (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\src\ngtsc\partial_evaluator\src\interpreter.js:342
:28)
at StaticInterpreter.visitExpression (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\src\ngtsc\partial_evaluator\src\interpreter.js:102:31)
at StaticInterpreter.visitCallExpression (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\src\ngtsc\partial_evaluator\src\interpreter.js:431:28)
at StaticInterpreter.visitExpression (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\src\ngtsc\partial_evaluator\src\interpreter.js:105:31)
at ClusterMaster.onWorkerMessage (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:195:27)
at C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:55:95
at ClusterMaster.<anonymous> (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:293:57)
at step (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\node_modules\tslib\tslib.js:143:27)
at Object.next (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\node_modules\tslib\tslib.js:124:57)
at C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\node_modules\tslib\tslib.js:117:75
at new Promise (<anonymous>)
at Object.__awaiter (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\node_modules\tslib\tslib.js:113:16)
at EventEmitter.<anonymous> (C:\Workspace\SPRINGBOOT\untitled\node_modules\@angular\compiler-cli\ngcc\src\execution\cluster\master.js:287:32)
at EventEmitter.emit (events.js:314:20)
C:\Workspace\SPRINGBOOT\untitled\node_modules\@ngtools\webpack\src\ngcc_processor.js:139
throw new Error(errorMessage + `NGCC failed${errorMessage ? ', see above' : ''}.`);
^
Error: NGCC failed.
at NgccProcessor.process (C:\Workspace\SPRINGBOOT\untitled\node_modules\@ngtools\webpack\src\ngcc_processor.js:139:19)
at C:\Workspace\SPRINGBOOT\untitled\node_modules\@ngtools\webpack\src\ivy\plugin.js:129:27
at Hook.eval [as call] (eval at create (C:\Workspace\SPRINGBOOT\untitled\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:26:1)
at Hook.CALL_DELEGATE [as _call] (C:\Workspace\SPRINGBOOT\untitled\node_modules\tapable\lib\Hook.js:14:14)
at Compiler.newCompilation (C:\Workspace\SPRINGBOOT\untitled\node_modules\webpack\lib\Compiler.js:1043:30)
at C:\Workspace\SPRINGBOOT\untitled\node_modules\webpack\lib\Compiler.js:1088:29
at Hook.eval [as callAsync] (eval at create (C:\Workspace\SPRINGBOOT\untitled\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:20:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\Workspace\SPRINGBOOT\untitled\node_modules\tapable\lib\Hook.js:18:14)
at Compiler.compile (C:\Workspace\SPRINGBOOT\untitled\node_modules\webpack\lib\Compiler.js:1083:28)
at C:\Workspace\SPRINGBOOT\untitled\node_modules\webpack\lib\Watching.js:200:19
C:\Workspace\SPRINGBOOT\untitled>ng serve --fix
Unknown option: '--fix'
After spending lot of time on 'npm cache clean --fix' and deleting node_module, we have find that typescript version is creating problem here. So I upgrade my "typescript": "3.6.5" to "typescript": "^4.3.5"
This solved my issue.
After that I run ng serve. There I got new error.
Thank you!.
No comments:
Post a Comment