microsoft / microsoft/CopilotStudioSamples

unable to rebuild the SharePointSSOAppCustomizer SPFx extension from scratch

Open
#383 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
797
Forks
491
PR merge metrics
No merged PRs in 30d

Description

What sample tool are you using?
SharePointSSOAppCustomizer
https://github.com/microsoft/CopilotStudioSamples/tree/main/SSOSamples/SharePointSSOAppCustomizer

Describe the bug
I tried to rebuild the sample but got issues when serving the app

] Error - [webpack] 'dist':
./lib/components/SharePointSSOAppCustomizer/AgentChat/AgentChat.js:65:42-86: Module not found: Error: Package path . is not exported from package C:\SharePointSSOAppCustomizer\node_modules\botframework-webchat-fluent-theme (see exports field in C:\SharePointSSOAppCustomizer\node_modules\botframework-webchat-fluent-theme\package.json)        
./node_modules/@microsoft/agents-copilotstudio-client/dist/src/copilotStudioClient.js:17:29-42: Module not found: Error: Can't resolve 'os' in 'C:\SharePointSSOAppCustomizer\node_modules\@microsoft\agents-copilotstudio-client\dist\src'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "os": require.resolve("os-browserify/browser") }'
        - install 'os-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "os": false }

To Reproduce
Steps to reproduce the behavior:
Rebuilding the app and running the extension through the previous error

Expected behavior
I rebuilt the SPFx extension as expected and was able to get it working.

Additional context
Add any other context about the problem here.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with SSOSamples/SharePointSSOAppCustomizer and inspect lib/components/SharePointSSOAppCustomizer/AgentChat/AgentChat.js alongside the reported package exports and @microsoft/agents-copilotstudio-client dependency errors. Run the sample's rebuild and serve steps; done means the SPFx extension builds and serves without these module-resolution errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.