Fix: Module ‘”@pnp/sp/presets/all”‘ has no exported member ‘sp’ (TS2305) in SPFx
The error Module ‘”@pnp/sp/presets/all”‘ has no exported member ‘sp’ means your code is PnPjs v2, but npm installed v3 or v4. Those versions dropped the global sp object. Create your own instance with spfi() instead: That returns the list items as plain JSON. No sp.setup(), no .get(). In this tutorial, we’ll reproduce the Module ‘”@pnp/sp/presets/all”‘ … read more…