-
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
Exported variable 'X' has or is using name errors with AOT off #3470
Comments
I had this issue as well and IIRC the problem was that I had properties/methods with an implicit return type that I wasn't actually importing. So for example even just a |
What is annoying though is the different behavior on the different aot flags and also how this changed from one beta to this one. I suspect, though can not verify, that it is related to the skipCodeGeneration bit. |
Before we were using Awesome-TypeScript-Loader, now we use the AoTPlugin for both AoT and non-AoT mode. It's actually faster than A-T-L, we just do the same thing but skip AoT code generation. That's the context for skipCodeGeneration. To go back to your error, this is actually a TypeScript error and your code is missing something: microsoft/TypeScript#5711 |
I get that @hansl however why does this only occur during skipCodeGeneration: true? Especially if I don't have declaration set as is mentioned in that bug? |
Considering angular-cli sets |
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. |
OS?
Sierra
Versions.
(exists in non local version as well)
Repro steps.
It seems to be when I import * from a submodule that does not export all of its members.
I ran a build with
ng build --aot=false
andng build
and that produced an error.ng build --aot
no error.The log given by the failure.
Mention any other details that might be useful.
googling the error message suggested that it is related to
declaration: true
being in the tsconfig or somehow set during compilation. I have it set to false in my code base and verified that it is looking at the correct tsconfig all the way down to the config models and in the build task.The text was updated successfully, but these errors were encountered: