[Bug]: Can't import @fluentui/react-components from node using esm.
Author: dzearingCreated Jun 19, 2025Updated Sep 11, 2026
LabelsType: Bug :bug:Partner AskFluent UI react-components (v9)Shield: P1
Component
Other...
Package version
9
React version
19
Environment
node 22Current Behavior
import { FluentProvider, webLightTheme, webDarkTheme } from '@fluentui/react-components'; ^^^^^^^^^^^^^^ SyntaxError: Named export 'FluentProvider' not found. The requested module '@fluentui/react-components' is a CommonJS module, which may not support all module.exports as named exports.
Expected Behavior
Works.
Reproduction
n/a
Steps to reproduce
- Create a test.mjs file with
import { FluentProvider } from '@fluentui/react-components'; - Run it
node test.mjs
Are you reporting an Accessibility issue?
None
Suggested severity
High - No workaround
Products/sites affected
OneDrive
Are you willing to submit a PR to fix?
no
Validations
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- The provided reproduction is a minimal reproducible example of the bug.
Source: microsoft/fluentui