CronixMicroSystems / ng2-typescript-boilerplate

A Angular2 + Redux + HOT + Webpack2 + Sass boilerplate
MIT License
10 stars 0 forks source link

Problem with RXJS #1

Open ravi4022 opened 7 years ago

ravi4022 commented 7 years ago

Hi,

When trying to issues the "npm dev run" command we got the below errors.

ERROR in D:\workspace\Angularjs_workspace\ng2-typescript-boilerplate\node_modules\rxjs\observable\dom\WebSocketSubject.d.ts (24,22): error TS2415: Class 'WebSocketSubject' incorrectly extends base class 'AnonymousSubject'. Types of property 'lift' are incompatible. Type '(operator: Operator<T, R>) => WebSocketSubject' is not assignable to type '(operator: Operator<T, R>) => Observable'. Type 'WebSocketSubject' is not assignable to type 'Observable'. Types of property 'operator' are incompatible. Type 'Operator<any, R>' is not assignable to type 'Operator<any, T>'. Type 'R' is not assignable to type 'T'.

ERROR in D:\workspace\Angularjs_workspace\ng2-typescript-boilerplate\node_modules\rxjs\Subject.d.ts (16,22): error TS2415: Class 'Subject' incorrectly extends base class 'Observable'. Types of property 'lift' are incompatible. Type '(operator: Operator<T, R>) => Observable' is not assignable to type '(operator: Operator<T, R>) => Observable'. Type 'Observable' is not assignable to type 'Observable'. Type 'T' is not assignable to type 'R'.

ERROR in ./src/store/store.ts (12,55): error TS2345: Argument of type '{ counter: (state: ICounterRecord, action: Action) => ICounterRecord; session: (state: ISessionRe...' is not assignable to parameter of type 'ReducersMapObjec '. Property 'router' is incompatible with index signature. Type '(state: string, action: RouterAction) => string' is not assignable to type 'Reducer'. Types of parameters 'action' and 'action' are incompatible. Type 'A' is not assignable to type 'RouterAction'. Type 'Action' is not assignable to type 'RouterAction'. Property 'payload' is missing in type 'Action'. webpack: Failed to compile.

could you please help us ?

maartenvanvliet commented 7 years ago

I came across a similar question on StackOverflow. This was my suggestion for now: https://stackoverflow.com/a/44835078/2087204

ravi4022 commented 7 years ago

Hi Maartenvanvliet,

Thank you fro your response. "ng2-typescript-boilerplate" project is very good in the architecture point view and they way you integrated the technologies like immuntablejs, RSJX or Redux is absolutely above the standards in the coding point of view and our team has been very much interested in following this architecture.

I would like to appreciate your efforts and time on this project. Coming to the issues, which was raised by myslef (here and StackOverflow), all the mentioned issues were solved last week itself. The solution same, I just removed the "next" variable in package.json file and placed the typescript version, in my case i used 2.1.0.

Apart from the above issues, the project has been facing another issue like

  1. Application unable to show the images (hope Happypack is not working properly) solution:i just commented the Happypack code and i added the below code which was collected from webpack2 documentation.

    {
          test: /\.(eot|svg)$/,
          loader: "file-loader?name=[name].[hash:20].[ext]"
        },
        {
          test: /\.(jpg|png|gif|otf|ttf|woff|woff2|cur|ani)$/,
          loader: "url-loader?name=[name].[hash:20].[ext]&limit=10000"
    }

    2.Unable to load the SCSS files. no solution found yet.

  2. If webpack running in production mode, it throws UglifyJS plugin related error.no solution found yet.

Is it possible to help?

Thank your your support. Regards, Ravi.