valor-software / ngx-bootstrap

Fast and reliable Bootstrap widgets in Angular (supports Ivy engine)
https://valor-software.com/ngx-bootstrap
MIT License
5.53k stars 1.69k forks source link

chore(build): Bunch of ts typing errors after install ng2-bootstrap #155

Closed chriscurnow closed 8 years ago

chriscurnow commented 8 years ago

First let me say this is great package – I am very much looking forward to getting it working.

However I just installed it (in Angular2 Webpack Starter) and got a bunch of errors while building.

I had no errors before I installed g2-bootstrap.

I don't think I did anything really stupid and I thought I had followed your instructions completely.

It would be great if you could point me in the right direction here.

Here are the errors:

ERROR in ./~/ng2-bootstrap/components/timepicker/timepicker.component.ts (108,5): error TS7027: Unreachable code detected.

ERROR in ./~/ng2-bootstrap/components/datepicker/date-formatter.ts (1,25): error TS2307: Cannot find module 'moment'.

ERROR in /Projects/web-apps/angular2/4cast-4d-starter/node_modules/angular2/src/facade/promise.d.ts (1,10): error TS2661: Cannot re-export name that is not defined in the module.

ERROR in /Projects/web-apps/angular2/4cast-4d-starter/node_modules/angular2/src/testing/matchers.d.ts (4,37): error TS2503: Cannot find namespace 'jasmine'.

ERROR in /Projects/web-apps/angular2/4cast-4d-starter/test/sanity-test.spec.ts (9,1): error TS2304: Cannot find name 'describe'.

ERROR in /Projects/web-apps/angular2/4cast-4d-starter/test/sanity-test.spec.ts (11,5): error TS2304: Cannot find name 'expect'.

ERROR in /Projects/web-apps/angular2/4cast-4d-starter/test/injector.spec.ts (11,1): error TS2304: Cannot find name 'describe'.

ERROR in /Projects/web-apps/angular2/4cast-4d-starter/test/injector.spec.ts (13,5): error TS2304: Cannot find name 'expect'.

ERROR in /Projects/web-apps/angular2/4cast-4d-starter/src/app/providers/title.spec.ts (10,1): error TS2304: Cannot find name 'describe'.

ERROR in /Projects/web-apps/angular2/4cast-4d-starter/src/app/providers/title.spec.ts (13,3): error TS2304: Cannot find name 'beforeEach'.

ERROR in /Projects/web-apps/angular2/4cast-4d-starter/src/app/providers/title.spec.ts (18,5): error TS2304: Cannot find name 'expect'.

ERROR in /Projects/web-apps/angular2/4cast-4d-starter/src/app/home/home.spec.ts (33,5): error TS2304: Cannot find name 'expect'.

ERROR in /Projects/web-apps/angular2/4cast-4d-starter/src/app/home/home.spec.ts (37,5): error TS2304: Cannot find name 'expect'.

ERROR in /Projects/web-apps/angular2/4cast-4d-starter/src/app/home/home.spec.ts (41,5): error TS2304: Cannot find name 'spyOn'.

ERROR in /Projects/web-apps/angular2/4cast-4d-starter/src/app/home/home.spec.ts (42,5): error TS2304: Cannot find name 'expect'.

ERROR in /Projects/web-apps/angular2/4cast-4d-starter/src/app/home/home.spec.ts (45,5): error TS2304: Cannot find name 'expect'.

ERROR in /Projects/web-apps/angular2/4cast-4d-starter/src/app/directives/x-large.spec.ts (30,9): error TS2304: Cannot find name 'expect'.

ERROR in /Projects/web-apps/angular2/4cast-4d-starter/src/app/app.spec.ts (13,1): error TS2304: Cannot find name 'describe'.

ERROR in /Projects/web-apps/angular2/4cast-4d-starter/src/app/app.spec.ts (21,5): error TS2304: Cannot find name 'expect'.

ERROR in /Projects/web-apps/angular2/4cast-4d-starter/src/app/app.spec.ts (25,5): error TS2304: Cannot find name 'expect'.

valorkin commented 8 years ago
  1. Use typescript 1.7.5 until 1.8 is supported by angular2 ERROR in ./~/ng2-bootstrap/components/timepicker/timepicker.component.ts (108,5): error TS7027: Unreachable code detected.
  2. this will help https://github.com/valor-software/ng2-bootstrap#with-webpack-angularclassangular2-webpack-starter (about typings) ERROR in ./~/ng2-bootstrap/components/datepicker/date-formatter.ts (1,25): error TS2307: Cannot find module 'moment'.
  3. all other issues is about your tests, not about ng2-bootstap. I have fixed it by installing typings for jasmine
chriscurnow commented 8 years ago

Thanks – much appreciated.