Open PineaFan opened 2 months ago
I've confirmed that by modifying the single file in the error, the program builds correctly. Edits:
File: .\node_modules\.pnpm\@radix-ui+react-menu@2.1.1_@types+react-dom@18.3.0_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1\node_modules\@radix-ui\react-menu\dist\index.mjs
Line 24:
- import { RemoveScroll } from "react-remove-scroll";
+ // import { RemoveScroll } from "react-remove-scroll";
Line 196:
- const ScrollLockWrapper = disableOutsideScroll ? RemoveScroll : React.Fragment;
+ const ScrollLockWrapper = disableOutsideScroll ? React.Fragment : React.Fragment;
Of course, this does remove the functionality, but it confirmed that this is the only file causing the error.
After further testing, this issue happens with pnpm
, and is fixed by switching to yarn
(Due to errors happening from within node_modules/.pnpm
)
Describe the bug
When trying to use any element with a scroll bar (dropdown, sheet, drawer, etc.) the same error is shown relating to
react-remove-scroll
Affected component/components
Dropdown, Sheet, Drawer
How to reproduce
npx shadcn-ui@latest add dropdown-menu
pnpm dev
(As the issue happens with the built-in example from the website, codesandbox is omitted)
Codesandbox/StackBlitz link
No response
Logs
Before submitting