AOT import * error: ERROR in Illegal state: symbol without members expected, but got
See original GitHub issueBug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
I did and search suggested to open new issue.
Versions.
node --version: v7.10.0 npm --version: 4.2.0 window 10 - 64bit
Repro steps.
Running command: webpack --env.aot --env.client & webpack --env.aot --env.server from aspnetcore-angular2-universal.
When importing components/services with * I get error if any import also includes *.
For example this works:
//lazy.module.ts
import * as components from "./components/all";
//all.ts
import {SomeComponent} from "./some";
export {SomeComponent};
And this is not working:
//lazy.module.ts
import * as components from "./components/all";
//all.ts
import * as childs from "./childs"; //I THINK THIS CAUSE ERROR
import {SomeComponent} from "./some";
export {childs, SomeComponent};
//childs.ts
import {OtherComponent} from "./other";
export {OtherComponent};
The log given by the failure.
ERROR in Illegal state: symbol without members expected, but got {"filePath":"E:/test-project/trunk/test-project/Client/app/modules/lazy/components/all.ts","name":"childs","members":["OtherComponent"]}.
Desired functionality.
AOT compiles successfully.
Full error
ERROR in Illegal state: symbol without members expected, but got {"filePath":"E:/test-project/trunk/test-project/Client/app/modules/lazy/components/all.ts","name":"childs","members":["OtherComponent"]}.
ERROR in E:/test-project/trunk/test-project/Client/main.server.aot.ts (11,42): Cannot find module './ngfactory/app/server-app.module.ngfactory'.
ERROR in ./Client/main.server.aot.ts
Module not found: Error: Can't resolve './ngfactory/app/server-app.module.ngfactory' in 'E:\test-project\trunk\test-project\Client'
@ ./Client/main.server.aot.ts 7:0-87
Issue Analytics
- State:
- Created 6 years ago
- Reactions:10
- Comments:18 (2 by maintainers)
Top Results From Across the Web
angular - Angular4 Prod Build Error - Stack Overflow
ERROR in Illegal state: symbol without members expected, but got {"filePath":"D:/Projects/app/node_modules/@angular/platform-browser/platform- ...
Read more >angular/angular-cli - Gitter
It looks like my problem is caused by having to import the MaterialModule into my unit test in order to get a compile...
Read more >AOT metadata errors - Angular
The compiler encountered a referenced to a locally defined symbol that either ... ERROR export let someTemplate: string; // exported but not initialized ......
Read more >Getting error while building angular app after installing ...
I have an Angular 5 application, in which i added the daypilot-pro-angular ... ERROR in Error: Illegal state: symbol without members expected, but...
Read more >Bug listing with status UNCONFIRMED as at 2022/12/24 17 ...
gives confusing output regarding system state and /etc/portage settings" ... Bug:586884 - "sys-fs/xfsprogs-4.5.0: xfs_growfs: symbol lookup error: ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Is it the same?
Error: Illegal state: symbol without members expected, but got {“filePath”:“skipped/call-history/data/call-history-type.ts”,“name”:“CallHistoryType”,“members”:[“AllCalls”]}.
And callhistory-type.ts contains:
Appeared when I moved from 4.1.3 to 4.3.1 With 4.2.6 it compiles
same issue here using constants like
provided by a shared “util” module and used in various (lazy-loaded) modules, including routing modules