React builder breaks with MUI Popper typings
See original GitHub issueCurrent Behavior
I can only replicate this with nx builder.
Error during bundle: Error: my-component.tsx(72,8): semantic error TS2740: Type '{ children: (props: any) => Element; open: boolean;
anchorEl: HTMLButtonElement | null; transition: true; placement: string; }' is missing the following properties from type
'Pick<PopperProps, "open" | "className" | "style" | "slot" | "title" | "defaultChecked" | "defaultValue" |
"suppressContentEditableWarning" | "suppressHydrationWarning" | ... 254 more ... | "popperRef">':
className, style, slot, title, and 255 more.
Storybook can serve it but when you run nx build:myReactLibrary
then you get the error above
Expected Behavior
That it builds without errors - just like the nx storybook plugin does
Steps to Reproduce
TS Playground, VSCode typescript server (IDE intellisense) and Storybook all compile the example correctly - only nx run my-lib:build
does it fails with the error above.
Failure Logs
Environment
Node : 16.13.1
OS : win32 x64
pnpm : 6.23.6
nx : 13.3.1
@nrwl/angular : undefined
@nrwl/cli : 13.3.1
@nrwl/cypress : 13.3.1
@nrwl/devkit : 13.3.1
@nrwl/eslint-plugin-nx : 13.3.1
@nrwl/express : undefined
@nrwl/jest : 13.3.1
@nrwl/linter : 13.3.1
@nrwl/nest : 13.3.1
@nrwl/next : undefined
@nrwl/node : 13.3.1
@nrwl/nx-cloud : 13.0.0
@nrwl/react : 13.3.1
@nrwl/react-native : undefined
@nrwl/schematics : undefined
@nrwl/tao : 13.3.1
@nrwl/web : 13.3.1
@nrwl/workspace : 13.3.1
@nrwl/storybook : 13.3.1
@nrwl/gatsby : undefined
typescript : 4.4.4
rxjs : 7.4.0
---------------------------------------
Community plugins:
@jscutlery/semver: 2.15.0
@jscutlery/semver: 2.15.0
@nrwl/js: 13.3.1
@trumbitta/nx-plugin-openapi: 1.10.0
(node:21680) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at myProject\node_modules\tslib\package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
MUI Popper: Placement not working as intended when using ...
I have a Box and upon clicking it, I open a popper that has some inputs. I am using ref and anchorEl to...
Read more >React Popper component - Material UI - MUI
A Popper can be used to display some content on top of another. It's an alternative to react-popper.
Read more >@mui/system | Yarn - Package Manager
@material-ui/types@6.0.0. This package is just re-released since version 5.1.7 had a breaking change. ... 5.0.0-alpha.31 ... Migrate 4 components to...
Read more >mui/material/CHANGELOG.md - UNPKG
549, This is an early release to fix `export 'useId' (imported as 'React') was not found in 'react'` when bundling code depending on...
Read more >front-end/node_modules/@material-ui/styles/CHANGELOG.md
[core] Introduce useId hook (#20407) @NMinhNguyen; [test] Fix broken tests in react@next (#20472) @eps1lon; [test] Use .checkPropTypes instead of render + ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have to change the latest “@types/react”.
@smasala The solution for me was to add params
onResize
andonResizeCapture
, which are missing in mui interface for some reason