Upgrading SharePointSSO Copilot SPFx to Botframework-WebChat 4.18

This is a quick post about how to make a few packages work together.

Firstly, we have this SharePoint SSO Copilot Studio Sample.
https://github.com/microsoft/CopilotStudioSamples/tree/master/SharePointSSOComponent

It uses SPFx 1.18, which uses typescript 4.7
It also uses botframework-webchat 4.15.9

There are a few really nice upgrades in Botframework-webchat since 4.15. But they also picked up a dependency on typescript 5.0.

Lots of people have reported issues with this…
https://github.com/microsoft/BotFramework-WebChat/issues/5345
https://github.com/microsoft/CopilotStudioSamples/issues/260

Now if only we can easily upgrade SPFx to typescript 5.0…
Which is exactly what MVP Andrew Connell has written here:
https://www.voitanos.io/blog/sharepoint-framework-typescript-v5/

So the final steps are:

  1. Commit everything first

  2. npm uninstall @microsoft/rush-stack-compiler-4.7 -DE

  3. npm install [email protected] -DE
    npm install [email protected] -DE

  4. npm install @microsoft/[email protected] -DE

  5. Update ./tsconfig.json (see AC’s blog!)

  6. npm install [email protected]

  7. I had the build failed because a task (lint) wrote output to stderr.
    So I had to switch off a few rules and suppress the error warning.

Surprisingly, everything works and deploys fine in SharePoint online.