I am creating a webpart using SPFX(react). I am using @pnp/sp for interaction with sharepoint. I want to have a global pnp configuration with the context without having to pass the context in each component as props.
I followed this code and created the pnpConfig file but I am getting the following error when I use it inside some component file.
Error: To view the information on this page, ask a global or SharePoint admin in your organization to go to the API management page