Skip to content

Error: Can't resolve 'react/jsx-runtime' in '/app/node_modules/@mui/system/esm/RtlProvider' #46689

@cuttingd

Description

@cuttingd

I work on a create-react-app application and getting the following error when running react-scripts build:

Module not found: Error: Can't resolve 'react/jsx-runtime' in '/app/node_modules/@mui/system/esm/RtlProvider'
Did you mean 'jsx-runtime.js'?
BREAKING CHANGE: The request 'react/jsx-runtime' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

react and react-dom are version is 17.0.2

These are the mui package versions I'm using:

"@mui/icons-material": "^6.5.0",
"@mui/material": "^6.5.0",
"@mui/styles": "^6.4.8",
"@mui/x-charts-pro": "^7.29.1",
"@mui/x-data-grid-pro": "^7.29.8",
"@mui/x-date-pickers-pro": "^7.29.4",

I can't upgrade material at this time because I'm in the process of migrating from dx-react-grid to x-data-grid and the dx-react-grid fails to compile with anything new than 6.x. This is also the reason I can't upgrade past react 17. Once I migrate all of our grids to x-data-grid I'll be able to bump those versions up.

Search keywords:

Metadata

Metadata

Assignees

Labels

scope: systemThe system, the design tokens / styling foundations used across components. eg. @mui/system with MUIstatus: waiting for maintainerThese issues haven't been looked at yet by a maintainer.v6.x

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions