question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WARNING exported interface not found

See original GitHub issue

N.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:closed
  • Created 6 years ago
  • Reactions:12
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
realappiecommented, Apr 14, 2017

I keep having this issue as well, its really frustrating as I have to restart the serve every time I add a new interface.

1reaction
mlofjardcommented, May 2, 2017

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. Restarting ng serve fixes the issue. It seems as though ng serve caches the interfaces between automatic re-compiles.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot import exported interface - export not found
Yesterday I found another question here and the solution it to declare the exported interface it a separate file. With one interface per ......
Read more >
Strange warning stating that export does not exist when it does
Interfaces no longer exist after transpiling. For webpack the export doesn't exist. 11
Read more >
ae-forgotten-export - API Extractor
The interface is missing the export keyword. This is valid TypeScript code, however it poses several problems from the perspective of API design:....
Read more >
NG0301: Export not found! - Angular
Use the export name to trace the templates or modules using this export. Ensure that all dependencies are properly imported and declared in...
Read more >
exports-loader - webpack
Useful when a source file does not contain exports or something does not export. ... Warning. By default loader generate ES module named...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found