Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Linux
What browser(s) / client(s) have you tested
Additional environment details
My working platform is Windows but I've used a GitHub Codespace to provide a reproduction. The details of that environment:
Node v22.22.1
npm v11.18.0
pnpm v11.12.0
SPFx versions 1.21.1 and 1.23.2
Describe the bug / error
I have a pnpm monorepo with SPFx solutions created over time, using different versions of SPFx. When I try to update one of the solutions to a SPFx version using the heft build I get errors from the webpack part of the process.
I'm unable to make public the repo, so I've created one with the minimum of code as a repro, for details see "Steps to reproduce".
Trying to start the newer solution via
cd packages/new
pnpm run start
gives the following errors:
[build:webpack] Error: Unable to find version "1.23.2" of component "@microsoft/sp-http-msgraph"
[build:webpack] Error: ManifestPlugin: Unable to find entry point for async bundle "new-web-part" in the manifest.
The old solution has a linting error but successfully serves the web part:
cd packages/old
pnpm exec gulp serve
Note that adding @microsoft/sp-http-msgraph as a direct dependency to the new project makes it work, but this shouldn't be needed, as a dependency of a dependency...?!?
Steps to reproduce
Please see this repo: https://github.com/sbrown-fc/spfx-monorepo-fail
Expected behavior
Project should build and serve without errors
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Linux
What browser(s) / client(s) have you tested
Additional environment details
My working platform is Windows but I've used a GitHub Codespace to provide a reproduction. The details of that environment:
Node v22.22.1
npm v11.18.0
pnpm v11.12.0
SPFx versions 1.21.1 and 1.23.2
Describe the bug / error
I have a
pnpmmonorepo with SPFx solutions created over time, using different versions of SPFx. When I try to update one of the solutions to a SPFx version using theheftbuild I get errors from thewebpackpart of the process.I'm unable to make public the repo, so I've created one with the minimum of code as a repro, for details see "Steps to reproduce".
Trying to start the newer solution via
gives the following errors:
The old solution has a linting error but successfully serves the web part:
Note that adding
@microsoft/sp-http-msgraphas a direct dependency to the new project makes it work, but this shouldn't be needed, as a dependency of a dependency...?!?Steps to reproduce
Please see this repo: https://github.com/sbrown-fc/spfx-monorepo-fail
Expected behavior
Project should build and serve without errors