Repository navigation
Contributting: Build error #875
Copy link
Copy link
Closed
Description
By following the instruction of the contribute page https://github.com/angular/angularfire2/blob/master/CONTRIBUTING.md#setup, I tried to build locally:
$ git clone (form my fork)
$ npm install
$ npm run build
The last command failed with the following:
angularfire2@2.0.0-beta.8 build /Users/alban/projects/angularfire2
rm -rf dist && tsc && rollup -c rollup.test.config.js
src/auth/auth.spec.ts(451,38): error TS2345: Argument of type '{ provider: string; }' is not assignable to parameter of type 'Expected<UserInfo>'.
Type '{ provider: string; }' is not assignable to type 'ObjectContaining<UserInfo>'.
Property 'jasmineMatches' is missing in type '{ provider: string; }'.
src/auth/auth.spec.ts(505,38): error TS2345: Argument of type '{ provider: string; }' is not assignable to parameter of type 'Expected<UserInfo>'.
Type '{ provider: string; }' is not assignable to type 'ObjectContaining<UserInfo>'.
src/database/firebase_list_factory.spec.ts(742,52): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Expected<Observable<any>>'.
Type 'string[]' is not assignable to type 'ObjectContaining<Observable<any>>'.
Property 'jasmineMatches' is missing in type 'string[]'.
src/database/firebase_list_factory.spec.ts(743,52): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Expected<Observable<any>>'.
Type 'string[]' is not assignable to type 'ObjectContaining<Observable<any>>'.
src/database/firebase_list_factory.spec.ts(782,52): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Expected<Observable<any>>'.
Type 'string[]' is not assignable to type 'ObjectContaining<Observable<any>>'.
src/database/firebase_list_factory.spec.ts(783,52): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Expected<Observable<any>>'.
Type 'string[]' is not assignable to type 'ObjectContaining<Observable<any>>'.
src/database/firebase_list_factory.spec.ts(822,52): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Expected<Observable<any>>'.
Type 'string[]' is not assignable to type 'ObjectContaining<Observable<any>>'.
src/database/firebase_list_factory.spec.ts(823,52): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Expected<Observable<any>>'.
Type 'string[]' is not assignable to type 'ObjectContaining<Observable<any>>'.
src/database/query_observable.spec.ts(10,28): error TS2345: Argument of type 'Query' is not assignable to parameter of type 'Expected<ScalarQuery>'.
Type 'Query' is not assignable to type 'ObjectContaining<ScalarQuery>'.
Property 'jasmineMatches' is missing in type 'Query'.
Node info:
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v6.10.0
npm ERR! npm v3.10.10
Typescript version @2.2.1 (from angular cli):
npm list -g | grep type
│ │ │ │ │ │ ├── domelementtype@1.1.3
│ │ │ │ │ ├── domelementtype@1.3.0
│ │ │ ├─┬ babel-types@6.23.0
│ │ ├── is-typedarray@1.0.0
│ │ ├─┬ mime-types@2.1.15
│ │ │ │ └── path-type@1.1.0
│ ├── typescript@2.2.1
│ │ │ │ │ ├── is-typedarray@1.0.0
│ │ │ │ │ ├─┬ mime-types@2.1.14
│ │ │ ├── content-type@1.0.2
│ │ │ ├── setprototypeof@1.0.3
│ │ │ ├─┬ type-is@1.6.14
│ │ │ │ └── media-typer@0.3.0
│ │ │ └── setprototypeof@1.0.2
│ │ │ └── path-type@1.1.0
│ │ │ │ └── path-type@1.1.0
│ │ │ └── typedarray@0.0.6
│ │ ├── is-typedarray@1.0.0
│ │ ├─┬ mime-types@2.1.12
│ │ │ └── typedarray@0.0.6
│ │ ├── is-typedarray@1.0.0
│ │ ├─┬ mime-types@2.1.12
OS:
MacOS Sierra 10.12.3
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
davideast commentedon Mar 29, 2017
@albanx Please follow the issue template as it would be good to know your TypeScript version.
albanx commentedon Mar 29, 2017
@davideast I just did an installation from scracht installing the default stuff included in the package.json. I updated with some more info the issue.
davideast commentedon Mar 29, 2017
Your TypeScript version is local to your machine. Do a
tsc -von your machine. Also, what OS are you on? These are all requirements for us to troubleshoot bugs.albanx commentedon Mar 29, 2017
albanx commentedon Mar 29, 2017
Really strange no where there is an instruction to install typescript with angular 2
albanx commentedon Mar 29, 2017
@davideast I did a fresh install, removed, cli, installed everything from scratch including tsc and angular, same result. I will try on a fresh linux distro now.
albanx commentedon Mar 29, 2017
Run on ubuntu same results:
davideast commentedon Mar 30, 2017
@albanx What OS are you running? Please use the issue template.
albanx commentedon Mar 30, 2017
[-]Build error[/-][+]Contributting: Build error[/+]albanx commentedon Mar 30, 2017
@davideast Please look the edit. Just to clarify this is not a bug regarding the use of the library, but a bug regarding the development of it (I am trying to contribute to it)
cartant commentedon Mar 30, 2017
@albanx Please don't make substantial edits to GitHub comments. Unlike Stack Overflow, for example, there is no edit history, so substantial edits can make conversations much more difficult to follow.
cartant commentedon Mar 30, 2017
@albanx From a console located in the project's root, run the commands separately, to verify which is failing:
tsc./node_modules/.bin/rollup -c rollup.test.config.jsAlso, your branch is not up to date with the latest master. You should address that, too.
albanx commentedon Mar 30, 2017
@cartant of course I just added more information on the issue, I did not change the scope of it. The problem is still the same. Do you have any clue why I have this issue? Can someone please try the exact same thing and let me know if it works?
albanx commentedon Mar 30, 2017
@cartant
tscis failing:I forked the branch 1 day ago, how outdate can it be?
cartant commentedon Mar 30, 2017
@albanx How out-of-date doesn't matter. If you have a problem, you have to remove as many differences and variables as possible. What happens if you run
./node_modules/.bin/tsc?albanx commentedon Mar 30, 2017
./node_modules/.bin/tsc:@davideast "How out-of-date doesn't matter" forked 24 hours ago yesterday on a mac pc, then 10 hours ago on a ubuntu pc, do you want me to do a fresh clone now? (but it will be again 1 minute out of date)?
albanx commentedon Mar 30, 2017
Just cloned again right now, here is the errors (slighty changed due to the fix done some hours ago from David probably):
MacOS Sierra, Tsc Version 2.2.2
cartant commentedon Mar 30, 2017
@albanx @davideast Well, I've reproduced the problem, but I don't yet know the cause. I'll have a look into it, but probably not till tomorrow.
cartant commentedon Mar 30, 2017
@albanx @davideast The problem is down the
@types/jasmineversion.In 2.5.46 - the latest version is 2.5.47 - the declarations where significantly changed and many uses of
anywere replaced with more specific types. In particular, anExpected<T>type was added and it's that that's causing the TypeScript errors.I'll look further into the tests to see what needs to be fixed, but in the meantime, the workaround is to install a pre-2.5.46 version:
fix(database): Fix test TypeScript errors