Closed
Description
I am having problems using mgt v2.9.2 package in sharepoint with the following package.json used in a Webpart generated with node v18.19.1
"dependencies": {
"@fluentui/react": "^8.106.4",
"@microsoft/mgt": "2.9.2",
"@microsoft/mgt-react": "2.9.2",
"@microsoft/mgt-spfx": "2.9.2",
"@microsoft/sp-component-base": "1.19.0",
"@microsoft/sp-core-library": "1.19.0",
"@microsoft/sp-http": "1.19.0",
"@microsoft/sp-lodash-subset": "1.19.0",
"@microsoft/sp-office-ui-fabric-core": "1.19.0",
"@microsoft/sp-property-pane": "1.19.0",
"@microsoft/sp-webpart-base": "1.19.0",
"react": "17.0.1",
"react-dom": "17.0.1",
"tslib": "2.3.1"
},
"devDependencies": {
"@microsoft/eslint-config-spfx": "1.20.1",
"@microsoft/eslint-plugin-spfx": "1.20.1",
"@microsoft/rush-stack-compiler-4.7": "0.1.0",
"@microsoft/sp-build-web": "1.20.1",
"@microsoft/sp-module-interfaces": "1.20.1",
"@rushstack/eslint-config": "2.5.1",
"@types/react": "17.0.45",
"@types/react-dom": "17.0.17",
"@types/webpack-env": "~1.15.2",
"ajv": "^6.12.5",
"eslint": "8.7.0",
"eslint-plugin-react-hooks": "4.3.0",
"gulp": "4.0.2",
"typescript": "4.7.4"
}
It crashes when adding mgt-spfx import to initialize in React Providers.globalProvider = new SharePointProvider(this.context);
Reading docs, this is how it is supposed to be used.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done ✔️