angular / mobile-toolkit

Tools for building progressive web apps with Angular
MIT License
1.34k stars 176 forks source link

ng serve --prod throws error when Compiling #40

Open satish860 opened 8 years ago

satish860 commented 8 years ago

I have followed the guide when I do ng serve --prod i am getting the following

The Broccoli Plugin: [BundlePlugin] failed with: Error on fetch for vendor/@angular2-material/toolbar/toolbar.js at file:///Users/satishvenkatakrishnan/hello-app/tmp/bundle_plugin-input_base_path-TtXUfUds.tmp/0/vendor/@angular2-material/toolbar/toolbar.js Loading app/hello-app.component.js Loading app/index.js Loading main.js Error: ENOENT: no such file or directory, open '/Users/satishvenkatakrishnan/hello-app/tmp/bundle_plugin-input_base_path-TtXUfUds.tmp/0/vendor/@angular2-material/toolbar/usr/local/google/home/jelbourn/material2/tmp/broccoli_type_script_compiler-input_base_path-IydvmmBU.tmp/0/components/toolbar/toolbar.js.map' at Error (native)

Let me know what I am missing

mike-henders commented 8 years ago

Having this issue as well. The app runs fine in development mode without the --prod switch.

antonmoiseev commented 8 years ago

I believe this is caused by the material2 issue - https://github.com/angular/material2/issues/541

Splaktar commented 8 years ago

There are a number of obscure workarounds for this. But in general, if you are using angular2-material@2.0.0-alpha.5 you will see this and a number of other incompatibilities with the mobile-toolkit (another here: https://github.com/angular/mobile-toolkit/issues/53).

Splaktar commented 8 years ago

Oh and it looks like this is fixed in the latest angular-cli master here: https://github.com/angular/angular-cli/pull/1056

You can get it via:

npm install -g git://github.com/angular/angular-cli.git#4108a674b46ccf94b07984c7aed3252e55615bde
zahlprish commented 8 years ago

@Splaktar installing that does not seem to do anything different, I am still getting the same error. Maybe I am overlooking something ?

Splaktar commented 8 years ago

This seems to be working fine in material2 alpha.6. It was a bug in that repo and not in mobile-toolkit.