-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Small TypeScript error after upgrading from 5.0.4 to 5.0.5 #29307
Comments
It doesn't look like this bug report has enough info for one of us to reproduce it. Please provide a CodeSandbox (https://material-ui.com/r/issue-template-latest), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve Could be related to #29293 |
@mnajdova I wanted to provide a CodeSandbox example but cannot seem to understand how to enable strict mode in TypeScript or how to change the tsconfig.json file? |
I'm having exactly the same issue. I have a Next.js project using Mui and it fails with this error when running ESLint is also picking up the error. |
i'm also having same issue, In 5.0.4
sandbox link: https://codesandbox.io/s/theme-any-bug-7eith?file=/src/Demo.tsx |
Also having this issue after upgrading to 5.0.5 on a nextjs project |
It's actually very hard to go backwards. When I force version 5.0.4 I still get the error. It turns out that Simply Installing @mui/system@=5.04 using yarn does NOT fix it, and
So I end up with two version of @mui/system. And it turns out that
And now I can build again :) |
Facing the same error. |
@timothyarmes suggestion works. Try that. |
@timothyarmes suggestion works but similar workaround can't be done with npm. |
absolutely same thing here. 5.0.3 works fine. |
I think the issue could be in packages/mui-system/src/createStyled.d.ts. I installed version 5.0.5 and replace the file content with the one in 5.0.4 and it works perfectly. |
Can somebody share their |
|
{
"compilerOptions": {
"allowJs": true,
"checkJs": false,
"skipLibCheck": true,
"noEmit": true,
"downlevelIteration": true,
"sourceMap": true,
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"noImplicitThis": false,
"noUnusedLocals": true,
"noUnusedParameters": false,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"useUnknownInCatchVariables": true,
"exactOptionalPropertyTypes": true,
"esModuleInterop": true,
"declaration": false,
"importHelpers": true,
"moduleResolution": "node",
"target": "es2017",
"module": "esnext",
"jsx": "react",
"baseUrl": "../",
"outDir": "../temp",
"removeComments": true,
"lib": [
"dom"
]
}
} |
Current Behavior 😯
After upgrading to the latest 5.0.5 version the following TypeScript code reports an error
src/pages/AboutPage/index.tsx:9:30 - error TS7031: Binding element 'theme' implicitly has an 'any' type.
Expected Behavior 🤔
No error as before
Steps to Reproduce 🕹
Context 🔦
Your Environment 🌎
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: