angular / angular-cli

CLI tool for Angular
https://cli.angular.io
MIT License
26.76k stars 11.98k forks source link

'build' makes bad output, but 'serve' works #2381

Closed ajackson-cpi closed 8 years ago

ajackson-cpi commented 8 years ago

angular-cli: 1.0.0-beta.15 node: 6.6.0 os: darwin x64 (El Capitan)

ng new something add & use: @angular2-material/checkbox @angular2-material/progress-circle angular2-highcharts

ng serve Works ng serve --prod Works

ng build fails compiles without error, but result is not legal javascript: Unexpected End of Input Illegal Token

bonnici commented 8 years ago

How are you testing the built distribution? Are you running it through some sort of web server?

JoshWilliams92 commented 8 years ago

I've had issues with the Nativescript CLI when using the current version of Node.js and not the latest stable version. Try downloading Node.js LTS v4.6.0 and see if it that works.

ajackson-cpi commented 8 years ago

Node 4.6.0 did not change anything. The Chrome browser continues to see those parse errors.

filipesilva commented 8 years ago

Can you give me a repository where I can see this happening? I can try to debug then.

ajackson-cpi commented 8 years ago

This was actually a case where it worked on another webserver, but these statics served on Apache-on-Vagrant broke. It was a surprising result since much larger JS assets were being served, but this configuration was truncating only angular-cli build results. It's a known Vagrant problem with SendFile

angular-automatic-lock-bot[bot] commented 5 years ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.