Skip to content
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

Can't use loadLegacyFabricCss in SPFX 1.8 #3612

Closed
1 of 4 tasks
araLT opened this issue Mar 15, 2019 · 6 comments
Closed
1 of 4 tasks

Can't use loadLegacyFabricCss in SPFX 1.8 #3612

araLT opened this issue Mar 15, 2019 · 6 comments
Labels
status:fixed-next-drop Issue planned to be fixed in an upcoming release.

Comments

@araLT
Copy link

araLT commented Mar 15, 2019

Category

  • Question
  • Typo
  • Bug
  • Additional article idea

Expected or Desired Behavior

According to SPFX 1.8 documentation, it is possible to add "loadLegacyFabricCss": true to web part manifest file in order to force old fabric CSS to be loaded in the page.

Observed Behavior

After adding the mentioned property ("loadLegacyFabricCss": true) to web part manifest file, execution of commands gulp serve or gulp bundle failed and after webpacking the following error message is displayed:

[15:29:01] Error - [write-manifests] Manifest validation error (./src/webparts/helloWorld/HelloWorldWebPart.manifest.json):
(#/) Data does not match any schemas from 'oneOf'
(#/) Missing required property: description
(#/) Missing required property: extensionType
(#/componentType) No enum match for: WebPart
(#/) Additional properties not allowed: loadLegacyFabricCss
(#/) Missing required property: items
(#/) Missing required property: rootComponentId

Steps to Reproduce

  1. Create new spfx 1.8 project containing web part.

  2. Add "loadLegacyFabricCss": true to web part manifest file. Here is Example of such manifest file:
    image

  3. Run command gulp serve or gulp bundle and you will get the mentioned error:
    image

@msft-github-bot
Copy link
Collaborator

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@msft-github-bot msft-github-bot added the Needs: Triage 🔍 Awaiting categorization and initial review. label Mar 15, 2019
@patmill
Copy link
Contributor

patmill commented Mar 15, 2019

Thank you to @srideshpande for finding a temporary solution. The final one will require an update to our public packages.

Go to the below location

node_modules\@microsoft\sp-module-interfaces\lib\manifestSchemas\jsonSchemas\client-side-web-part-manifest.schema.json

Add the following line to the file before the 'canUpdateConfiguration' entry

 "loadLegacyFabricCss": { "$ref": "any-value.schema.json" }

save, and run gulp or gulp build or gulp bundle or gulp --ship.

@araLT araLT closed this as completed Mar 18, 2019
@abhishek-raj
Copy link

@patmill Is this fixed yet? I am facing the same issue when I used it yesterday.

@araLT Can you reopen the bug as it is not fixed yet and the temporary solution would not work in build pipelines?

For now, I am just including the fabric css file directly using require('../../../../node_modules/office-ui-fabric-core/dist/css/fabric.min.css'); till this is fixed.

@araLT araLT reopened this Mar 20, 2019
@salahsaleh
Copy link

@patmill is this fixed yet?

I am also facing same issue but with another property 'supportedHosts:["SharePointWebPart","TeamsTab"]'

When I am passing this values in manifiest file of project I am getting error.

@patmill patmill added status:fixed-next-drop Issue planned to be fixed in an upcoming release. and removed Needs: Triage 🔍 Awaiting categorization and initial review. labels Apr 15, 2019
@VesaJuvonen
Copy link
Contributor

Fixed with the v1.8.1 release - see release notes at - https://github.com/SharePoint/sp-dev-docs/wiki/SharePoint-Framework-v1.8.1-release-notes

@msft-github-bot
Copy link
Collaborator

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

@SharePoint SharePoint locked as resolved and limited conversation to collaborators Jan 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:fixed-next-drop Issue planned to be fixed in an upcoming release.
Projects
None yet
Development

No branches or pull requests

6 participants