my ng serve
is broken currently with the following error message:
ERROR in node_modules/@angular/compiler-cli/index.d.ts(20,10):
error TS2305:
Module '"./node_modules/@angular/compiler-cli/src/ngtools_api"'
has no exported member 'NgTools_InternalApi_NG_2'.
(module path shortened to relative project location for privacy)
This came out of the blue and i'm very confused, where to find this bug.
A search on Google/ Github brought the following threads:
But these are not really helpful to me.
I'm not actively using NgTools_InternalApi_NG_2, at least not that I'm aware of.
It could be that some other library is using some things if compiler-cli package internally, but I think that in this case the error would have shown up earlier.
The goal of that branch was to transform some component from using plain material-components-web to using angular-material components. I only have this problem in one specific branch, but I'm not aware of using NgTools_InternalApi_NG_2 in there. Finding the library, which may use NgTools_InternalApi_NG_2 could be very difficult I think.
Since I only have this problem in one branch and my master is fine, I'll start digging into all the changes on my branch above master to probably find something. When I'm done I think that I'll be able to provide some code on how to reproduce the Problem.
In the meantime, if somebody has an idea where to look for, I would highly appreciate it!
Now I've found the answer myself.
While transforming the code from material-components-web to angular-material components i wanted to use a Span
class, hoping that Typescript whould have a class like Span extends HTMLElement
for typed access to this HTMLElement.
Unfortunately, @angular/compiler-cli does also have a Span class, which was auto-imported by Webstorm as I tried to use a Span class.import {Span} from '@angular/compiler-cli';
So, if someone get's stuck at a similar problem, search your codebase for any imports or other usages of @angular/compiler-cli
.
If you remove them, it should work perfectly fine again. 🙂
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With