-
Notifications
You must be signed in to change notification settings - Fork 12k
1.5.1 build-optimizer "TypeError: candidate.value.definition is not a function" #8571
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
Having the same issue here using angular-cli 1.5.3
|
This is an uglify bug: mishoo/UglifyJS#2497 |
Thanks @kzc for letting us know! Do you know how we might implement a workaround for angular cli? Doesn't look like it's straightforward (or even possible?) to pass uglify js options into the build process |
As a temporary workaround for this bug you could add In the case of uglifyCompressOptions.collapse_vars = false; I'm not an Angular user. @filipesilva Could you please confirm this is the right place for this setting? |
Hey @kzc, than you for letting us know! We don't expose Uglify options so this is hard to work around... The file you found is indeed the right place. For users that want a more CI friendly workaround, you can downgrade from 1.5.x to 1.4.x, since the latter uses |
The bug is present in both branches - latest You might try using an older version of |
@filipesilva it would be handy if the uglify options were exposed; we are already tweaking the |
I got this issue too on CLI 1.5.0. |
I am downgrading to |
|
@kzc awesome, thank you! For users affected by this problem, here is how you can force your dependencies to use the You can't just add it as a dependency with a new version since the To see what version you have, run
To force an indirect dependency to use a new version, you'll have to update your cache and remove the any package-locks you have. This series of commands should do it:
After all of this, you should be able to see the new version:
I realize this process is cumbersome. NPM does not offer a good way to force update indirect dependencies. I've submitted a PR to update our direct dependency ( Then Angular CLI can update to that version and everyone gets the new version of |
Partially address angular#5618 Fix angular#8571 Fix angular#8505
Partially address angular#5618 Fix angular#8571 Fix angular#8505
Partially address angular#5618 Fix angular#8571 Fix angular#8505
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
It worked with 1.5.0 with --build-optimizer and works with 1.5.1 when specifying --build-optimizer=false.
The text was updated successfully, but these errors were encountered: