thangchung / blog-core

Modular blog using Blazor with clean domain-driven design patterns
MIT License
409 stars 124 forks source link

BlogCore.App issue #18

Closed hitaspdotnet closed 5 years ago

hitaspdotnet commented 6 years ago

Hi sir. Thanks for amazing commenting and helpful details If is possible I need some help at running BlogCore.App. I am student and I cant understand why got this errors: ERROR in [at-loader] ./ClientApp/containers/Blog/BlogForm.tsx:133:19 TS2322: Type '{ name: "moderateComments"; placeholder: "Moderate comments"; component: typeof Checkbox; }' is not assignable to type '(IntrinsicAttributes & IntrinsicClassAttributes<Field<GenericFieldHTMLAttributes>> & Readonly<{ c...'. Type '{ name: "moderateComments"; placeholder: "Moderate comments"; component: typeof Checkbox; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Field<GenericFieldHTMLAttributes>> & Readonly<{ ch...'. Type '{ name: "moderateComments"; placeholder: "Moderate comments"; component: typeof Checkbox; }' is not assignable to type 'Readonly<BaseFieldProps<GenericFieldHTMLAttributes> & TextareaHTMLAttributes<HTMLTextAreaElement>>'. Types of property 'component' are incompatible. Type 'typeof Checkbox' is not assignable to type '"input" | "select" | "textarea" | ComponentClass<(InputHTMLAttributes<HTMLInputElement> & Wrapped...'. Type 'typeof Checkbox' is not assignable to type 'StatelessComponent<(InputHTMLAttributes<HTMLInputElement> & WrappedFieldProps) | (SelectHTMLAttri...'. And 4 mores like this in [at-loader] ./ClientApp/containers/Blog/BlogForm.tsx:133:19 & in [at-loader] ./ClientApp/redux/modules/blog.ts:281:14 & in [at-loader] ./ClientApp/redux/modules/common.ts:20:14 & in [at-loader] ./node_modules/rxjs/scheduler/VirtualTimeScheduler.d.ts:22:22

Thanks

mjamro commented 6 years ago

I'm seeing the same thing. Has anyone solved how to fix that?

thangchung commented 6 years ago

This is caused by the invalid version of ts packages, make sure that you guys used the correct one version of typescript

mjamro commented 6 years ago

@thangchung Soo... which version is valid?

amit-sonora commented 5 years ago

HI, I am facing the same issue mentioned above. Anybody able to solve?

Thx Amit

amit-sonora commented 5 years ago

Hi.. how to resolve this issue? Thx Amit

BionStt commented 5 years ago

@amit-sonora @mariuszjamro , @hitaspdotnet Hello brother, to ix this issue. you just change knowaction to anyaction. please check in reducer.

in [at-loader] ./ClientApp/containers/Blog/BlogForm.tsx:133:19 & in [at-loader] ./ClientApp/redux/modules/blog.ts:281:14 & in [at-loader] ./ClientApp/redux/modules/common.ts:20:14

i use windows powershell. in blog-core folder run dotnet restore in blog-core/src/hosts/blogapp/ npn i node then npm install then npm i node-sass@4.5.3 then node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod then node node_modules/webpack/bin/webpack.js

dotnet run

you can try

thank you

amit-sonora commented 5 years ago

Thx Bion, But issue persist.

image

BionStt commented 5 years ago

export const reducer: Reducer = ( state: CommonState, action: KnownAction ) => {

blog-core/src/Hosts/BlogCore.App/ClientApp/redux/modules/Common.ts blog-core/src/Hosts/BlogCore.App/ClientApp/redux/modules/Blog.ts

knowaction to anyaction

BionStt commented 5 years ago

@amit-sonora

BionStt commented 5 years ago

in blogmanagement change number to any blog-core/src/Hosts/BlogCore.App/ClientApp/containers/Blog/BlogManagement.tsx

type BlogProps = BlogStore.BlogState & typeof BlogStore.actionCreators & RouteComponentProps<{ page: number }>;

@amit-sonora

amit-sonora commented 5 years ago

Thx Bien.. can you please post compete changed files .. Sorry but I am a beginner in js.

BionStt commented 5 years ago

test1

BionStt commented 5 years ago

test2

BionStt commented 5 years ago

https://github.com/sass/node-sass/releases

if you need node-sass win32-x64-67. @amit-sonora

amit-sonora commented 5 years ago

THx a ton Bion. Able to see at least below screen.

image