Angular 4, Unexpected token: name (Subject) during ng build --prod
See original GitHub issueBug Report or Feature Request (mark with an x
)
- [ ] bug report -> please search issues before submitting
- [ ] feature request
I have a Angular 4 application.
I can successfully build the project with ng build
But, when I run ng build --prod error is thrown.
When I did some research, I saw uglifyjs not working with es6 and I changed target to es5 in my tsconfig file.
But I keep getting this error.
I don’t understand what is wrong.
Versions.
Repro steps.
- Run this command:
ng build --prod
The log given by the failure.
ERROR in vendor.4008cf7dff2b98412878.bundle.js from UglifyJs Unexpected token: name (Subject) [vendor.4008cf7dff2b98412878.bundle.js:19471,6]
Desired functionality.
The build should finish without an error
Mention any other details that might be useful.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
Angular 4, Unexpected token: name (Subject) during ng build
Run ng build --prod --sourcemaps to identify the package causing the problem. Then you need to find a workaround. That's the challenge...
Read more >angular/angular-cli - Gitter
Hey everyone. I just started experiencing a very weird issue when trying to build my angular app. I get the error "An unhandled...
Read more >ng build - Angular
Option Description Value Type Default Value
‑‑aot Build using Ahead of Time compilation. boolean true
‑‑base‑href Base url for the application being built. string
‑‑delete‑output‑path Delete...
Read more >Angular Archive - TechOverflow
woff2 in the dist folder when building for production using ng build . These hashes have the purpose of preventing the files from...
Read more >The Complete Guide to Angular User Authentication with Auth0
Get the Starter Application. Look for the 🛠️️ emoji if you'd like to skim through the content while focusing on the build steps....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you again 😃 Now, I will close issue. My problem is solved.
first
to detect the error second check the 3th libs causing problem