spfx-40-fantastics icon indicating copy to clipboard operation
spfx-40-fantastics copied to clipboard

Errors While Building the code

Open kulkarnichief opened this issue 7 years ago • 5 comments

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?

kulkarnichief avatar Sep 19 '17 07:09 kulkarnichief

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?

CodeHeight avatar Sep 26 '17 20:09 CodeHeight

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.

kulkarnichief avatar Sep 27 '17 08:09 kulkarnichief

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.

CodeHeight avatar Sep 27 '17 12:09 CodeHeight

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

kmarwen avatar Oct 30 '17 09:10 kmarwen

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

kmarwen avatar Oct 31 '17 09:10 kmarwen