spfx-40-fantastics
spfx-40-fantastics copied to clipboard
Errors While Building the code
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\node_modules@types\react\index.d.ts(292,33): error TS1005: '(' expected.
I have installed all dependencies as per package.json. Am I missing something?
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?
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.
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.
So what are the solutions to build without erros ? what versions or what spfx ? thx
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