Skip to content

[Bug]: Can't import @fluentui/react-components from node using esm. #34685

Open
@dzearing

Description

@dzearing

Component

Other...

Package version

9

React version

19

Environment

node 22

Current 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

  1. Create a test.mjs file with import { FluentProvider } from '@fluentui/react-components';
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions