Skip to content

unable to rebuild the SharePointSSOAppCustomizer SPFx extension from scratch #383

@mohammadamer

Description

@mohammadamer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions