-
Notifications
You must be signed in to change notification settings - Fork 12k
Error running production build after upgrading to angular-cli 1.5 #8576
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
I have almost the same error after migration from angular 4 to angular 5: With command command I didn't try yet this command, but you can try: |
That's true! I ran the build with parameter to disable the build optimization. Now I can load the page but I get a different error. Will post that later, on phone now. EDIT: running the command
solves the initial error but now I am getting the following this error
I found this issue #7797 which seems to be related to the target ES version but we are using ES2017. Any thoughts? |
Heya, I'd like to look into this but really need a repro I can tinker with. Can you setup a minimal repro please? You can read here why this is needed. A good way to make a minimal repro is to create a new app via |
Hey @filipesilva cool, ty! |
So.... Note: When removing the barrel from app/src/reducers/index and paste the code directly from app/src/reducers/public_api into app/src/reducers/index the JIT prod builds are working. The error I receive now:
You can find the repository here https://github.com/SamiAl90/angular-cli-issue-8576 I ran following commands AOT ENABLED BUILD OPTIMIZER DISABLED
AOT DISABLED BUILD OPTIMIZER DISABLED
AOT ENABLED BUILD OPTIMIZER ENABLED
I hope this helps analysing the issue. |
#8434 (comment) - this comment save my time. Maybe it will be useful for you too. |
In the sample repo I provided this is not that case. |
Any news on this? We really would love to upgrade to angular 5.x |
@Birdperson90 I ran this commands:
I think this should fail since I didn't see the error you mentioned but I did see a API call failure: Then I commented out What should I do to see it? |
Hey @filipesilva Hm, this is really strange. I am still receiving errors and used the same command to run the application.
What version of angular cli are you running globally? Edit |
You might have your API locally, allowing your app to work correctly. Can you try updating to 1.6.3 locally to see if everything is fixed then? |
@filipesilva it wasn't the api call that caused the issue, I wasn't able to run the app at all b4 upgrading to cli 1.6.1 it seems to be fixed now on that project. Thanks for the help. |
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. |
Versions
Repro steps
Observed behavior
When opening the web page after deploying the production build I receive the error
Interesting is that when I run
ng serve --aot=false
the application is working as expected.Desired behavior
Before the upgrade to angular 5 and angular cli 1.5 production builds were running without any problems. I am just wondering what is wrong now
Mention any other details that might be useful
the package.json looks like this:
I already googled for this issue. Some issues state that this can be caused by circular dependencies which is not the case (at least the cli is not showing any warning). Any help would be appreciated.
Thanks in advance.
The text was updated successfully, but these errors were encountered: