Forum Discussion
rosamartinamilazzo25
May 14, 2026Copper Contributor
pnp-modern-search does not work in the local SharePoint workbench
Version used 4.9.0 (SPFx 1.15.0) Describe the bug The solution works correctly when deployed using the .sppkg package in SharePoint Online, but it does not work in the local SharePoint workbench. ...
ScrollZSilva
May 14, 2026Copper Contributor
Hi,
Since the .sppkg package works correctly in SharePoint Online, the issue is likely related specifically to the local workbench environment or bundle/chunk resolution during local serving.
A few things you can try:
- Delete and reinstall dependencies completely:rm -rf node_modules rm package-lock.json npm install
- Clear old build artifacts:gulp clean gulp build gulp bundle gulp serve
- Verify that the local workbench version is compatible with SPFx 1.15.0
- Some older/local workbench APIs can behave inconsistently with newer dependency versions
- The Cannot find module './15.js' error often indicates chunk loading or webpack bundling issues
- Check if dynamic imports or lazy-loaded modules are being generated incorrectly
- Also verify webpack/package version compatibility
- Try testing with a minimal/default web part in the same local workbench environment to confirm whether the issue is specific to pnp-modern-search or the local setup itself
Since SharePoint Online deployment works correctly, this does not appear to be a packaging issue, but rather a local development/runtime resolution problem.
Let me know if you find anything different after rebuilding the environment 👍