Paldom / angular2-rest

Angular2 HTTP client to consume RESTful services. Built with TypeScript.
MIT License
248 stars 72 forks source link

Tripple Slash Error on import #9

Open jasonboggess opened 8 years ago

jasonboggess commented 8 years ago

Getting the following errors when trying to import the module:

[0] node_modules/angular2-rest/angular2-rest.d.ts(1,1): error TS2654: Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition.
[0] node_modules/angular2-rest/angular2-rest.d.ts(1,1): error TS6053: File 'node_modules/angular2-rest/node_modules/angular2/core.d.ts' not found.
[0] node_modules/angular2-rest/angular2-rest.d.ts(2,1): error TS6053: File 'node_modules/angular2-rest/node_modules/angular2/http.d.ts' not found.
[0] node_modules/angular2-rest/angular2-rest.d.ts(3,1): error TS6053: File 'node_modules/angular2-rest/node_modules/rxjs/Rx.d.ts' not found.
Paldom commented 8 years ago

Please check if you use the same Angular version as this package.

jasonboggess commented 8 years ago

I was using angular 2 beta 2. Looks like this uses beta 0?

marni commented 8 years ago

I'm on "angular2": "2.0.0-beta.2", and I'm having exactly the same issue.


node_modules/angular2-rest/angular2-rest.d.ts(1,1): error TS2654: Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition.
/node_modules/angular2-rest/angular2-rest.d.ts(1,1): error TS6053: File /node_modules/angular2-rest/node_modules/angular2/core.d.ts' not found.
/node_modules/angular2-rest/angular2-rest.d.ts(2,1): error TS6053: File /node_modules/angular2-rest/node_modules/angular2/http.d.ts' not found.
/node_modules/angular2-rest/angular2-rest.d.ts(3,1): error TS6053: File /node_modules/angular2-rest/node_modules/rxjs/Rx.d.ts' not found.

I also get typescript compiler errors about Observable requiring generic type:

    @GET("todo/")
    public getTodos( @Query("sort") sort?: string): Observable { return null; }; 

error TS2314: Generic type 'Observable<T>' requires 1 type argument(s).

Changing it to

    @GET("todo/")
    public getTodos( @Query("sort") sort?: string): Observable<Todo> { return null; }; 

makes the compiler happier.

comlaterra commented 8 years ago

Asked 3 months ago and no reply... Is this library maintained?