-
Notifications
You must be signed in to change notification settings - Fork 12k
Symbol without members expected error after 2.4.7 -> 4.0.0-beta.8 #4821
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
Comments
@ctrl-brk ,how you did "moving from 2.4.7 to 4.0.0-beta.8"? just upgrade the "angular" module in the package.json? |
Yes. Is there anything else needs to be done? |
i'm so sorry, indeed, i have no idea; |
@ctrl-brk can you post the results of ng --version? |
Also seeing the same upgrading from beta 7 to beta 8. Only occurs on the AOT build:
Version details:
|
Same problem here. My guess is that we need to fix the config files. Best way will be to ng init an empty project and diff to see which changes need to be done. Edit: could not find any change necessary compared to a 'ng new test --ng4' My current quickfix: downgrade to beta7 |
@deebloo |
I am having the same problem with an existing app. I started a new project in an empty folder
I am still trying to nail down a consistently reproducible case. |
The problem I have seems to be with the test for my header component (header.component.spec.ts). It is using the RouterTestingModule. I commented out the entire test file and now I can build production successfully. I am not sure why a testing file would affect the production build but now I am past this problem. Later I will revisit the test and try to fix it. |
I found the problem. For some reason the production build is compiling the spec.ts files although the documentation says it is exclude "**/*.spec.ts" files by default. I added this to src/tsconfig.json: Now it compiles successfully ( |
same problem here by upgrading from beta7 to beta8. |
Make sure you add the exclude in the correct place in src/tsconfig.json (I mention this because I did it wrong the first time).
|
I think the changes made 1.0.0-rc.0 (which have the exclude in src/tsconfig.app.json) mean this issue could be closed. |
getting similar error, but with actual app code:
the file referenced in the error looks like this: import * as reducers from './reducers';
import * as actions from './actions';
import * as effects from './effects';
export { reducers, actions, effects }; Is this not an AOT compatible code? Update Is this a bug or expected behavior? |
Fixed by #4924 @DmitryEfimenko your issue is not the same as this one. Please open up a new issue and fill in the template. |
@DmitryEfimenko Did you report your problem with re-export? |
@MaklaCof I didn't open a new issue. Please feel free to do it. Also please link it here. I'd like to subscribe to it. |
i had the same problem, fixed it by running a different build command line: instead of ng build --prod use ng build --env=prod |
For anyone else reading this, please be wary of the suggestion of reverting to It will "work" in that you'll get a build, but that build does not contain AoT-compiled templates. |
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. |
I'm submitting a ... (check one with "x")
Current behavior
After moving from 2.4.7 to 4.0.0-beta.8 I'm getting the following error when executing
ng build -prod
. Justng build
(without -prod) works fine.ERROR in Illegal state: symbol without members expected, but got {"filePath":"C:/Projects/myproj/node_modules/@angular/router/index.d.ts","name":"router_private","members":["ROUTER_PROVIDERS"]}.
Expected behavior
ng build -prod
should work asng build
Please tell us about your environment:
Windows 10, @angular/cli 1.0.0-beta.32.3
node --version
= 7.5.0The text was updated successfully, but these errors were encountered: