pnp / sp-dev-samples

Code samples for SharePoint add-ins, web hooks and other API samples
MIT License
85 stars 129 forks source link

DefaultButton class not available from Fabric UI in this version #12

Open CodingSinceThe80s opened 7 years ago

CodingSinceThe80s commented 7 years ago

Category

[ x ] Question [ ] Bug [ ] Enhancement

First off thanks for creating this sample! I come from the .NET world and have been experimenting with this sample as part of my "conversion". I've noticed that the included office-ui-fabric-react version does not support some components, for instance DefaultButton import { DefaultButton } from 'office-ui-fabric-react/lib/Button';

I have tried doing npm update office-ui-fabric-react --save in the project and I am getting a whole load of compilation errors like this one when running gulp: Error - typescript - node_modules\office-ui-fabric-react\lib\common\BaseComponent.d.ts(29,24): error TS1005: '=' expected.

As far as I can tell it's trying to compile the new office-ui-fabric-react library and not succeeding. Why would that be? Is there an incompatibility between webpack/react and the newest office-ui-fabric-react version? If so how could I work around this? I have only just begun to understand the connection between webpack and typescript and babel and whatnot so any conceptual help is welcome.