-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AOT import * error: ERROR in Illegal state: symbol without members expected, but got #6443
Comments
If it helps I experience another interesting error inside nested lazy module.
Components.ts:
|
same issue here using constants like export const Constants = {
foo = 'bar'
// ...
}; provided by a shared "util" module and used in various (lazy-loaded) modules, including routing modules |
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 |
@sherlock1982: yes, i think so, i had/have the same issue after upgrading from 4.1.3 to 4.3 |
I tried upgrading from 4.1.3 to 4.3.2, and got this issue. I had to go back to 4.1.3. Mine is caused by re-exporting Enums, but I assume that's the first stop, and then it will complain about all re-exports. |
We have the same issue in Angular 4.3.3 when using enums in our NgModule Route data. note: the following code compiles in AoT but leaves nulls in the route data, (as pointed out by @mattscu) and not the actual enum value. AoT compiles but does not work
|
@brentwilton: tried your solution and it compiled with aot, but unfortunately the compiled code had null values while the non aot code worked - so the workaround didn't really work for me :( (i' not using enums but constants like mentioned above) tried angular-cli 1.27 and the new 1.3.0 but both didnt work |
I may be confusing things here, but is this related to angular/angular#18170? |
just getting this error during CLI AOT prod build.
at enum:
packages:
edit:
removing the enum from this file and replacing enum values with numbers fixed the AOT error. |
I ran into the exact same problem today, while passing an enum value as route data (similar to what @GeorgeKnap described). My route example: My enum example:
In my case however, I managed to get this working by removing the 0 value from my enum:
First example fails in AOT build, while the second one succeeds. Though this may not be a solution for everyone, it might be good to know! |
The same problem with enums in my project. Version: 4.4.6 |
@hansl Any progress? It's 5 months. I just upgraded to I have over 300 components and it is becoming a real mess because I can not nest imports into NgModule.
and not this:
|
@MaklaCof , I have same project structure with imports as you have (your Containers), have you manage to work with AOT ? |
@Sky4CE No I din't, but this is huge problem for me. I have over 100 containers and component in each lazy loaded module. Aliases in NgModule seems horrible solution. Currently I am not building as AOT, but will need to do something in next month, if @hansl doesn't fix this. |
Can you still reproduce it with the latest CLI? |
I am not sure. I restructure my entire project. I couldn't live with that. |
If the problem still exists in the latest version of the CLI, please open a new issue following the template and providing a minimal demo where we can reproduce it. Thanks! :-) |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)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:
And this is not working:
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
The text was updated successfully, but these errors were encountered: