nativescript-angular-drawer-template icon indicating copy to clipboard operation
nativescript-angular-drawer-template copied to clipboard

Fail to build with typescript 2.4.1

Open gbonline opened this issue 8 years ago • 1 comments

Hi, I' tried your template, On iOS with the updated typescript to 2.4.1 version. The app fail to build , with the message error below. If I downgrade typescript to the 2.2.2 version all goes well.

iMacTutor:drawer_demo3 nemesix$ tns run ios
Executing before-prepare hook from /Users/nemesix/Sviluppo/NativeScript3/drawer_demo3/hooks/before-prepare/nativescript-dev-typescript.js
Found peer TypeScript 2.4.1
node_modules/rxjs/Subject.d.ts(16,22): error TS2415: Class 'Subject<T>' incorrectly extends base class 'Observable<T>'.
  Types of property 'lift' are incompatible.
    Type '<R>(operator: Operator<T, R>) => Observable<T>' is not assignable to type '<R>(operator: Operator<T, R>) => Observable<R>'.
      Type 'Observable<T>' is not assignable to type 'Observable<R>'.
        Type 'T' is not assignable to type 'R'.

node_modules/tns-core-modules/ui/core/properties/properties.d.ts(48,14): error TS2559: Type 'Property<T, U>' has no properties in common with type 'TypedPropertyDescriptor<U>'.

node_modules/tns-core-modules/ui/core/properties/properties.d.ts(59,14): error TS2559: Type 'CoercibleProperty<T, U>' has no properties in common with type 'TypedPropertyDescriptor<U>'.

TypeScript compiler failed with exit code 1

gbonline avatar Jul 18 '17 14:07 gbonline

Use the below Project.json to make this work . Found out when working with it. Resolved the rx/js and tns-core-modules compatibility issues.

{
	"description": "NativeScript Application",
	"license": "SEE LICENSE IN <your-license-filename>",
	"readme": "NativeScript Application",
	"repository": "<fill-your-repository-here>",
	"nativescript": {
		"id": "org.nativescript.NSTest",
		"tns-android": {
			"version": "4.0.1"
		}
	},
	"dependencies": {
		"@angular/common": "~4.0.0",
		"@angular/compiler": "~4.0.0",
		"@angular/core": "~4.0.0",
		"@angular/forms": "~4.0.0",
		"@angular/http": "~4.0.0",
		"@angular/platform-browser": "~4.0.0",
		"@angular/platform-browser-dynamic": "~4.0.0",
		"@angular/router": "~4.0.0",
		"nativescript-angular": "~3.0.0",
		"nativescript-telerik-ui": "^2.0.1",
		"nativescript-theme-core": "~1.0.4",
		"reflect-metadata": "~0.1.8",
		"rxjs": "^6.1.0",
		"rxjs-compat": "^6.1.0",
		"tns-core-modules": "~4.0.0",
		"zone.js": "~0.8.2"
	},
	"devDependencies": {
		"babel-traverse": "6.18.0",
		"babel-types": "6.18.0",
		"babylon": "6.13.1",
		"lazy": "1.0.11",
		"nativescript-dev-typescript": "^0.4.0",
		"typescript": "^2.3.2",
		"zone.js": "~0.7.2"
	}
}

iamsourabh-in avatar May 16 '18 15:05 iamsourabh-in