0

Graph toolkit × NotSupportedError: Failed to execute 'define' on 'CustomElementRegistry': the name "mgt-mock-provider" has already been used with this registry using these version "@microsoft/mgt": "^2.3.0", "@microsoft/mgt-react": "^2.3.0",

tried to upgrade and down grade

1 Answers1

1
"@microsoft/mgt": "^2.3.0", 
"@microsoft/mgt-react": "^2.3.0"

Both contain the same code but are scaffolded for different environments. Please only use one reference at a time, if your project is react, use only the mgt-react library.

Nic Vogt
  • 261
  • 1
  • 6
  • Nic Vogt- i am using the toolkit components to create a library using(create-react-library), and the main app which use library also has some toolkit components, when ever i link the library to the main app there is problem with the same : "error Failed to execute 'define' on 'CustomElementRegistry': the name "mgt-mock-provider". The library and the main app work independently they render the graph toolkit components , there is a problem when I do npm link and link to main app, – Umamaheshwari G Dec 23 '21 at 15:51
  • I found differences between the packages and posted the question https://github.com/microsoftgraph/microsoft-graph-toolkit/issues/1513 – Christophe Feb 06 '22 at 04:39