Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for loading ES Module in require() is an experimental #12410

Closed
gaborbernat opened this issue Nov 27, 2024 · 1 comment
Closed

Support for loading ES Module in require() is an experimental #12410

gaborbernat opened this issue Nov 27, 2024 · 1 comment
Labels

Comments

@gaborbernat
Copy link

I'm using React Router as a...

library

Reproduction

When using react-router-dom v7 I am getting:

CommonJS module react-router-dom/dist/index.js is loading ES Module node_modules/react-router/dist/development/dom-export.mjs using require().
Support for loading ES Module in require() is an experimental feature and might change at any time

System Info

System:
    OS: macOS 14.7
    CPU: (10) arm64 Apple M1 Pro
    Memory: 1.14 GB / 32.00 GB
    Shell: 3.7.1 - /opt/homebrew/bin/fish
  Binaries:
    Node: 23.3.0 - /opt/homebrew/bin/node
    npm: 10.9.0 - /opt/homebrew/bin/npm
  Browsers:
    Chrome: 131.0.6778.86
    Safari: 18.1
  npmPackages:
    react: ^18.3.1 => 18.3.1
    react-dom: ^18.3.1 => 18.3.1
    react-router-dom: ^7.0.1 => 7.0.1
    vite: ^5.4.10 => 5.4.10

Used Package Manager

npm

Expected Behavior

No warnings.

Actual Behavior

Long list of warnings when running test suite.

@timdorr
Copy link
Member

timdorr commented Nov 28, 2024

You should be using the react-router package now, as per the upgrade instructions.

@timdorr timdorr closed this as completed Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants