PatrickJS / NG6-starter

:ng: An AngularJS Starter repo for AngularJS + ES6 + Webpack
https://angularclass.github.io/NG6-starter
Apache License 2.0
1.91k stars 1.35k forks source link

Uncaught TypeError: _angular2.default.module(...).component is not a function #81

Closed diit closed 8 years ago

diit commented 8 years ago

While running npm test I get:

Chrome 47.0.2526 (Windows 10 0.0.0) ERROR
  Uncaught TypeError: _angular2.default.module(...).component is not a function
  at C:/xampp/projects/project/spec.bundle.js:31716 <- webpack:/C:/xampp/projects/project/client/app/common/hero/hero.js:5:0
fesor commented 8 years ago

you have two solutions:

1) update to angular 1.5 2) add this line to every file with module definition:

import 'angular-component';

p.s. This problem introduced in #72

mattycraig commented 8 years ago

Adding import angularComponent from 'angular-component'; to spec.bundle.js solved this for me.

fesor commented 8 years ago

@mattycraig I don't know is it good to require it in spec.bundle.js. Will think on fixing this.

fesor commented 8 years ago

@diit this issue doesn't solved yet.

diit commented 8 years ago

Of course - however the solution proposed through updating angular solve the issue for me.

On Sat, Jan 9, 2016 at 10:51 AM, Sergey Protko notifications@github.com wrote:

@diit https://github.com/diit this issue doesn't solved yet.

— Reply to this email directly or view it on GitHub https://github.com/AngularClass/NG6-starter/issues/81#issuecomment-170254196 .

Thanks, Dale Inverarity