-
Notifications
You must be signed in to change notification settings - Fork 12k
'ng build --prod' failing with es5 as target #7303
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
One of your third party libraries is shipping es6+ code, but we don't support building that at the moment (#2907). It's not very easy to track it down because that code just breaks the build process. My advice is to do |
This is still not supported, but just for tracking it down, I recommend doing |
Fantastic, thanks @AmitMY. Just in case anyone hits the same issue, I found the culprit: the cbor library required by autobahn. |
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
)Versions.
1.2.7
Also seen on 1.2.1 before I updated in an attempt to fix
Repro steps.
ng build --prod
The log given by the failure.
ERROR in vendor.749569c349ba199c26dd.bundle.js from UglifyJs
Unexpected token: name (Decoder) [vendor.749569c349ba199c26dd.bundle.js:26296,6]
I know there are many issues similar to this but I have been unable to fix it using the suggestions. I have tried setting my target to 'es5' and this doesn't help. The UglifyJSWebpackPlugin fix doesn't seem to be possible without configuring the build completely myself.
I should note, where ever this Decoder class is coming from, it's not in code I've written (which seems to make sense given it's in vendor) and I have no way to find out where it is coming from. It may well be an unused library but it's tricky to track down (a quick grep shows at least 5 "Decoder" classes in my node_modules".
The text was updated successfully, but these errors were encountered: