-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
SyntaxError: Named export 'styled' not found. The requested module '@mui/material/styles/index.js' is a CommonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export, for example using: #503
Comments
After an update I've got exactly the same problem, any progress on this yet? |
@ferriss |
Same issue here, it happens after you install the |
In our case, we added the following patch to fix this issue until it is fixed in a new release:
diff --git a/lib/layout/Error.js b/lib/layout/Error.js
index ff42479b1eb353c1e3e9fb118f2e340bbd5556fc..70f45adf58814e1d65a085b8a38725bb794e45af 100644
--- a/lib/layout/Error.js
+++ b/lib/layout/Error.js
@@ -11,8 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
};
import React from 'react';
import { Title, useTranslate } from 'react-admin';
-import { Accordion, AccordionDetails, AccordionSummary, Box, Button, Typography, } from '@mui/material';
-import { styled } from '@mui/material/styles/index.js'; // eslint-disable-line import/extensions
+import { styled, Accordion, AccordionDetails, AccordionSummary, Box, Button, Typography, } from '@mui/material';
import ExpandMoreIcon from '@mui/icons-material/ExpandMore.js'; // eslint-disable-line import/extensions
import HistoryIcon from '@mui/icons-material/History.js'; // eslint-disable-line import/extensions
import RefreshIcon from '@mui/icons-material/Refresh.js'; // eslint-disable-line import/extensions
|
same issue, even tried uninstalling react-admin and mui/material, nothing helped except the @ltcmdrkeen method. |
* Add symfony/uid * Clean up .idea/ for api-platform * Move Kernel to Shared/ * Automatically configure src/Module/{ApiResource,Entity} folders * Update API title * Setup modular folder structure * Add OrmProcessor * Add unique AbstractUuidEntity uuid property * Add simple user registration via API * Refactor UserRegisterProcessor, add UserProvider * Add GetCollection for UserModel * Add makefile and test namespaces check script * Refactor UserProvider, add filtering and pagination * Add UserRegisterProcessorTest * Add LexikJWTAuthenticationBundle * Prefix api routes with /api/ * Configure security * Test authentication, add UUID to JWT payload * Add Exam entity * Add StethoMeApiClient, save examination date * Scaffold basic front end, registration UI * Improve performance on Windows/Mac * Add login support to admin panel api-platform/admin#503 (comment) * Fix ExamModel examinedAt name * Add NextAuth authentication to /app * Add custom layout for /app * Store client API token in session * Add exams pages * Add navbar layout * Redirect NextAuth routes to PWA container They overlap with our /api/auth and customization does not seem to work so this is a bit of a workaround. * Fetch client token in exam details view * Add Media-API token endpoint * Implement fetching Media-API token from external API * Add mediaUrl to Media-API token output * Finish implementation of exam screen * Code format * Fix PWA dockerfile build * Fix Caddy build https://dunglas.dev/2023/08/6x-faster-docker-builds-for-symfony-and-api-platform-projects/
API Platform version(s) affected: '@api-platform/admin': ^3.4.3
Description
I trying run auth on admin but I got error:
How to reproduce
I just using code from docs: https://api-platform.com/docs/admin/authentication-support/
Possible Solution
I don't now. Frontend has never been my strong suit
Additional Context
Using this:
I am getting exactly the same error.
I using official docker images: https://github.com/api-platform/api-platform
The text was updated successfully, but these errors were encountered: