Comments (9)
Please provide a reproduction using a GitHub repository or a live example on CodeSandbox or StackBlitz. Did you check this Stack Overflow thread: https://stackoverflow.com/questions/64453859/directory-import-is-not-supported-resolving-es-modules-with-node-js?
from material-ui.
This should be possible after we release esm support. @DiegoAndai will have more answers. Right now, we are blocked on some issues from Next.js.
from material-ui.
Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information.
from material-ui.
@DiegoAndai Hi!
How long do you think is it going to take for you to release the esm support?
Thanks!
from material-ui.
Hi! We tried to implement it for v6, but it was not possible due to the Next.js issue mentioned: vercel/next.js#65056. We're currently waiting for a response from the Next.js team, so sadly I cannot provide an estimated date. We'll try to do it ASAP, it's a priority for us.
Marked as on hold, blocked by: #30671
from material-ui.
@DiegoAndai
Thank you! I will be waiting :)
from material-ui.
@DiegoAndai Hi!
FYI: this is the issue that I am currently facing:
I have this in the file app/common/Theme/theme.tsx
:
import { red } from "@mui/material/colors";
And it is throwing the following error:
Error: Directory import '/app/node_modules/@mui/material/colors' is not supported resolving ES modules imported from /app/build/index.js
Did you mean to import @mui/material/node/colors/index.js?
at new NodeError (node:internal/errors:405:5)
at finalizeResolution (node:internal/modules/esm/resolve:321:11)
at moduleResolve (node:internal/modules/esm/resolve:980:10)
at defaultResolve (node:internal/modules/esm/resolve:1193:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:404:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:373:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:250:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:39)
at link (node:internal/modules/esm/module_job:75:36)
I have tried all the suggestions like this one: Did you mean to import @mui/material/node/colors/index.js?
but none have worked so far.
Thanks!
from material-ui.
@titanve you should use serverModuleFormat: 'cjs'
in your vite config, like this: https://github.com/mui/material-ui/blob/next/examples/material-ui-remix-ts/remix.config.js#L10. Do you have this?
If not, may I ask you to share your remix config here? Thanks 😊
from material-ui.
Hi @DiegoAndai
I haven't installed vite yet. Should I install it as part of the migration process? I think is not necessary, is it?
Thanks!
from material-ui.
Related Issues (20)
- [docs] CSS modules customization guide is incomplete
- Upgrading to 5.16.1 ignores `defaultProps` in MUI theme HOT 1
- [material-ui][TextField] `id` in `InputProps` in TextField is reflected in its HTML input, not parent div. HOT 3
- [material-ui] Blog template has broken image links HOT 1
- [material-ui] Blog template has broken image links HOT 2
- @mui/[email protected] missing dependency @popperjs/core HOT 4
- Significant Bundle Size Increase After Recent MUI Update HOT 6
- npm install with v5.16.2 is throwing popper/node_modules does not exist HOT 1
- Could not resolve "@popperjs/core" HOT 1
- Make more compatible with Terser Mangler HOT 1
- TS Module Augmentation: Allow adding a new color to all components HOT 1
- [Joy-ui] [Table] Focus style on table rows is inconsistent
- [material-ui] Outlined Input component needs to get min value for its number type! HOT 1
- [material-ui][Select] Changing IconComponent makes the new icon unclickable HOT 2
- [material-ui][TextField] The override for MuiTextField does not work after changing from version 5.15.21 to 5.16.4 HOT 6
- [docs] StylesProvider to avoid ID changes with RTL snapshots HOT 2
- [material-ui][Autocomplete] Make multiple selected values available to FormData HOT 2
- Keyboard scrolling doesn't work in fullscreen Dialog
- Styles not added to shadow DOM when wrapping MUI in a library HOT 2
- [joy-ui] Overriding Drawer Size throws browser error in Dev build HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from material-ui.