3

I am trying to get my project to build on Travis (all works fine locally). I am running into an issue with Typescript. In my .travis.yml file, I ahve this group of commands:

before_script:
  - npm i -g typescript typings
  - typings install
  - tsc

to run the typescript compilation. However, when I run this, I get loads of errors...

e.g.

client/dev/nav/nav.component.ts(4,29): error TS2307: Cannot find module '../user/services/user.service'. node_modules/angular2-jwt/node_modules/rxjs/CoreOperators.d.ts(35,67): error TS2304: Cannot find name 'Promise'. node_modules/angular2-jwt/node_modules/rxjs/CoreOperators.d.ts(50,66): error TS2304: Cannot find name 'Promise'. node_modules/angular2-jwt/node_modules/rxjs/CoreOperators.d.ts(89,67): error TS2304: Cannot find name 'Promise'.

Here is the full build log. and Here is the full repo.

Presumably, Typings is not installed correctly, Typings is not configured correctly or There's no reference to the main typings file in any server/client files?

Would really appreciate some guidance as to what might be wrong, or where I can look to debug this?

George Edwards
  • 8,979
  • 20
  • 78
  • 161

2 Answers2

0

Typings is not configured correctly

From the error log Promise is not defined. Quickest fix is to just add promise.d.ts e.g. : v8promise.d.ts and add it to your project.

BenVlodgi
  • 2,135
  • 1
  • 13
  • 26
basarat
  • 261,912
  • 58
  • 460
  • 511
0

use Jasmine's promises instead

import { promise } from 'protractor'
Rachid O
  • 13,013
  • 15
  • 66
  • 92