-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when use with SharePoint Framework 1.7.0 #7054
Comments
SharePoint needs to use the latest 5.x release from OUFR. We are working with them to get this upgrade but it will take time in their part. |
Please feel free to close this bug if your question has been answered. |
To my understanding SPFX 1.7.0 is still not on React 16, and therefore does not support Fabric 6.x. |
SPFX 1.7 actually uses React 16 so that’s not the underlying issue any longer. |
How have you confirmed this? Everyone I've spoken to is saying that they are still working on React 16 support, as well as TypeScript 2.7 support. Both of which are needed to properly use Fabric 6.x |
I created a new project with the generator and the packages reference React 16. It still uses TypeScript 2.4.2 though. |
Hmm, I'll check into that. Either my info is out of date, or the generator jumped the gun. |
Unfortunately, SPFx also needs to be on TypeScript >=2.8 to be able to consume Fabric 6... a workaround is if you install I believe this combination should stand a good chance of working with SPFx 1.7.0. |
This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your contributions to Fabric React! |
Have you actually done this and confirmed it working? |
Hi @kurtnelle, I tried @cliffkoh solution but the errors still appear. The only solution I've found is to use the lts version (5.134.0) that comes with @uifabric/merge-styles 6.8.1. |
There are multiple things that could be at play that explains why the errors still occur. In theory it shouldn't just because 6.8.1 doesn't have the offending TypeScript code that forces TypeScript 2.8.2, so it could be instead due to a variety of other factors (which would necessitate looking at the NPM/node modules tree to figure out of there was another version of merge-styles being loaded instead). By the way, as far as I know (but I may be wrong), an upcoming release of SPFx should support at least TypeScript 2.9 and so this problem should go away. @VesaJuvonen or @patmill can speak more accurately to this. |
any solution? I meet this bug now. |
Fabric React works with SPFx 1.8 now. See this post for implementation details. |
Version SPFx 1.8
|
@Dangerous-Mind your log shows you're still on typescript 2.7.2. Read the blog post @coreyroth pointed and switch to rush stack 3.0 or higher, this should solve your issue :) |
Or use version 5.132.0 of office-ui-fabric-react |
Yeah. I had done what @coreyroth sugested and partialy solved the problem. I then got a error saying that there was no typescript. The question is that all of this should be working from the start. SPFx 1.8 installes office-ui-fabric-react 6 and typescript 2.7.2 that doesn't work with it. But I then realized that this is the office-ui-fabric-react gitub and this is a spfx problem |
Corey has mentioned the file name wrongly in his article. The file that has to be changed is the tsconfig.json, not the tslint.config file. |
@sudharsank good catch on tsconfig.json. I've updated my post. |
Moving to @microsoft/rush-stack-compiler-3.0 yielded a bunch of other strange errors for me. I'm using SPFX 1.8.0 and React 16. But the compiler version 2.9 worked fine for me:
|
Hi, Thanks @coreyroth for this information. I couldn't make it work with the 3.0 version (I got a tslint error), but I made it work with the 3.2 version (also thx to @estruyf its blog post : eliostruyf.com/using-the-full-potential-of-react-in-sharepoint-framework-1-8-0/). Anyway, I think that for the moment we should wait for a stabilized compatibility between SPFx 3.x TypeScript projects and 6.x Office Fabric React... 😅 Does anyone know on which version of Office UI Fabric React is based the 1.8 version of @microsoft/sp-office-fabric-core ? |
Please provide a reproduction of the bug in a codepen:
package.json:
Actual behavior:
Build fails with provided error message.
Expected behavior:
Build to succeed.
The text was updated successfully, but these errors were encountered: