Version 4.29.0 issue
Hi all,
It seems that the new version 4.29.0 is broken. I got an error when build the project:
ERROR in [at-loader] ./node_modules/office-ui-fabric-react/lib/components/Button/Button.Props.d.ts:15:45
TS2694: Namespace 'React' has no exported member 'AllHTMLAttributes'.
ERROR in [at-loader] ./node_modules/office-ui-fabric-react/lib/components/Button/Button.Props.d.ts:121:23
TS2694: Namespace 'React' has no exported member 'ButtonHTMLAttributes'.
ERROR in [at-loader] ./node_modules/office-ui-fabric-react/lib/components/Button/Button.Props.d.ts:121:71
TS2694: Namespace 'React' has no exported member 'AnchorHTMLAttributes'.
ERROR in [at-loader] ./node_modules/office-ui-fabric-react/lib/components/ChoiceGroup/ChoiceGroup.Props.d.ts:6:50
TS2694: Namespace 'React' has no exported member 'InputHTMLAttributes'.
ERROR in [at-loader] ./node_modules/office-ui-fabric-react/lib/components/Image/Image.Props.d.ts:4:44
TS2694: Namespace 'React' has no exported member 'ImgHTMLAttributes'.
ERROR in [at-loader] ./node_modules/office-ui-fabric-react/lib/components/Label/Label.Props.d.ts:4:44
TS2694: Namespace 'React' has no exported member 'LabelHTMLAttributes'.
ERROR in [at-loader] ./node_modules/office-ui-fabric-react/lib/components/Link/Link.Props.d.ts:7:43
TS2694: Namespace 'React' has no exported member 'AllHTMLAttributes'.
ERROR in [at-loader] ./node_modules/office-ui-fabric-react/lib/components/SearchBox/SearchBox.Props.d.ts:8:48
TS2694: Namespace 'React' has no exported member 'InputHTMLAttributes'.
ERROR in [at-loader] ./node_modules/office-ui-fabric-react/lib/components/TextField/TextField.Props.d.ts:25:48
TS2694: Namespace 'React' has no exported member 'AllHTMLAttributes'.
ERROR in [at-loader] ./node_modules/office-ui-fabric-react/lib/components/pickers/AutoFill/BaseAutoFill.Props.d.ts:41:51
TS2694: Namespace 'React' has no exported member 'InputHTMLAttributes'.
ERROR in [at-loader] ./node_modules/office-ui-fabric-react/lib/components/pickers/BasePicker.Props.d.ts:53:24
TS2694: Namespace 'React' has no exported member 'InputHTMLAttributes'.
ERROR in [at-loader] ./node_modules/office-ui-fabric-react/lib/components/pickers/PickerItem.Props.d.ts:2:52
TS2694: Namespace 'React' has no exported member 'AllHTMLAttributes'.
Has anyone have same problem?
Thanks, Toan
Strangely, I had the same issue but I was running Version 4.13.2. I kinda solved it by updating to 4.30.0 but then, I got lots and lots of type errors. I think that VS Code might be the culprit here as before updating, I didn't have these issues. Did you use VS Code?
I also just upgraded to 4.30.0 and am having type errors that I assume are from the same cause. It says 'onClick' does not exist for any of the button components, but they extend
React.AllHTMLAttributes<HTMLAnchorElement | HTMLButtonElement | BaseButton | Button>
so it should be there. I am also using VS Code
Looks like your resolution is here: https://github.com/OfficeDev/office-ui-fabric-react/issues/2382
This is due to a major change in @types/react (which we can't control.) Can you please update your version to 15.0.38?
The release notes have been updated to more explicitly call this out. Please let us know if the problems go away.
https://github.com/OfficeDev/office-ui-fabric-react/releases/tag/office-ui-fabric-react_v4.29.0
Thank you, @ClickSimply When I update react to 15.0.38 and the errors are gone.
Yup, it's the react typings that caused the break.