WARNING exported interface not found
See original GitHub issueN.B. Already opened issue on angular https://github.com/angular/angular/issues/15800
I’m submitting a … (check one with “x”)
[X] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior I don’t know if this is about angular compiler itself or additional warning from angular cli. I open issue here
I have an exorted interface in src/app/shared/form-utils/localized-input/localized-input.component.ts
like:
export interface Language {
id: number;
cultureName?: "fr-CH" | "de-CH";
}
And I import this interface inside a component in src/app/shared/form-utils/autocomplete/autocomplete-plan-comptable-element/autocomplete-plan-comptable-element.component.ts
I import it like this:
import {Language, LocalizationKey} from "../../localized-input/localized-input.component";
but when I compile (ng serve) I get warning like:
WARNING in ./src/app/shared/form-utils/autocomplete/autocomplete-plan-comptable-element/autocomplete-plan-comptable-element.component.ts
203:50-58 "export 'Language' was not found in '../../localized-input/localized-input.component'
Minimal reproduction of the problem with instructions read above…
Please tell us about your environment: windows10, webstorm 2017.1.1
- Angular version: 2.0.X
@angular/cli: 1.0.0
node: 7.7.2
os: win32 x64
@angular/common: 4.0.1
@angular/compiler: 4.0.1
@angular/core: 4.0.1
@angular/forms: 4.0.1
@angular/http: 4.0.1
@angular/platform-browser: 4.0.1
@angular/platform-browser-dynamic: 4.0.1
@angular/router: 4.0.1
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.1
- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
- Language: typescript 2.2.2 (on webstorm tsc is run and it didn’t get me error for this import)
All other import are correct and same and works
Issue Analytics
- State:
- Created 6 years ago
- Reactions:12
- Comments:5 (1 by maintainers)
I keep having this issue as well, its really frustrating as I have to restart the serve every time I add a new interface.
I’m also having this problem when working with interfaces. Every time I make a change to an interface and
ng serve
is running, the re-compile fails. Restartingng serve
fixes the issue. It seems as thoughng serve
caches the interfaces between automatic re-compiles.