OlivierCC / spfx-40-fantastics

This package is a sample kit of Client Side Web Parts built on the SharePoint Framework SPFx. You can find here different kind of high visual web parts as carousel, images galleries, animations, map, editors, etc.
MIT License
408 stars 279 forks source link

Errors While Building the code #48

Open kulkarnichief opened 6 years ago

kulkarnichief commented 6 years ago

I am getting following errors when trying to build the code with Gulp Serve

_[_09:16:59] Error - typescript - node_modules\@microsoft\sp-loader\node_modules\@types\react\index.d.ts(3524,25): error TS2694: Namespace 'React' has no exported member 'SVGProps'. [09:16:59] Error - typescript - src\webparts\sliderGallery\SPPicturesListService.ts(61,126): error TS2345: Argument of type 'SPHttpClientConfiguration' is not assignable to parameter of type 'SPHttpClientConfiguration'. Also SpLoader seems to be a problem Error - typescript - node_modules\@microsoft\sp-loader\nodemodules\@types\react\index.d.ts(292,33): error TS1005: '(' expected._

I have installed all dependencies as per package.json. Am I missing something?

CodeHeight commented 6 years ago

Are you having issue with all the webparts or just the Slider Gallery? Would it be better to create an new SPFx project with the latest version and attempt to update the webpart code?

kulkarnichief commented 6 years ago

I am facing the same issue with all webparts. I have created new project for one webpart but haven't tried with others, I had hoped that might be a fix available here.

CodeHeight commented 6 years ago

Well, thanks for sharing your experience with these webparts. You saved me some time and headache. I'm interested in the twitter webpart and a few others, but not all of them for my current SPFx v1.3 project. Do you recommend I stay with SPFx v1.1, 1.2 or go ahead an attempt to fix some with v1.3?

Btw, I installed the webparts in my SharePoint environment and have no issues.

kmarwen commented 6 years ago

So what are the solutions to build without erros ? what versions or what spfx ? thx

kmarwen commented 6 years ago

as @kmosti and I mentioned here : https://github.com/OlivierCC/spfx-40-fantastics/issues/43

I just removed the ^ and ~ from :

"@microsoft/sp-core-library": "~1.1.0",
"@microsoft/sp-http": "^1.1.1",
"@microsoft/sp-loader": "^1.1.1",

now i have :

"@microsoft/sp-core-library": "1.1.0",
"@microsoft/sp-http": "1.1.1",
"@microsoft/sp-loader": "1.1.1",

deleted the 2 folders : @Microsoft and @types from node_modules

added context in MessageBarWebPart.ts

PropertyFieldRichTextBox('text', { context:this.context, gulp clean gulp serve

and that's all, and works fine

thank you