ui icon indicating copy to clipboard operation
ui copied to clipboard

NEW components (sonner, drawer, resizable) install FAILS when not in a NextJS project: `next-themes` requires `"next@*"`

Open lacymorrow opened this issue 1 year ago • 2 comments

Sonner works great in a NextJS app, in a regular React app installation fails due to unmet peer dependency "next@*".

See stack trace:

⠸ Installing sonner...Command failed with exit code 1: yarn add sonner next-themes
warning [email protected]: The engine "pnpm" appears to be invalid.
warning " > [email protected]" has unmet peer dependency "next@*".
error Command failed with exit code 1.
yarn add v1.22.21
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved 2 new dependencies.
info Direct dependencies
├─ [email protected]
└─ [email protected]
info All dependencies
├─ [email protected]
└─ [email protected]
$ ts-node .erb/scripts/check-native-dep.js && electron-builder install-app-deps && npm run build:dll
  • electron-builder  version=24.9.1
  • loaded configuration  file=package.json ("build" field)
  • installing production dependencies  platform=darwin arch=arm64 appDir=/Users/lacymorrow/repo/cinematic/release/app
  ⨯ /Users/lacymorrow/.nvm/versions/node/v18.18.2/bin/node process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code:
1
Error output:
npm ERR! could not determine executable to run

lacymorrow avatar Dec 29 '23 16:12 lacymorrow

+1, I just used the original Toast component.

Some of these new components are duplicative of existing components (Sonner ~= Toast; Drawer ~= Sheet) and it seems like a departure from previous ones that were mostly wrappers around radix components only.

goldins avatar Jan 03 '24 22:01 goldins

There are a few components built around other libraries, like the command component, but there are definitely overlaps in functionality (granted, the sonner component is nicer than the original toast).

I'm hoping the next-themes requirement was an oversight.

lacymorrow avatar Jan 04 '24 05:01 lacymorrow

This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.

shadcn avatar Feb 26 '24 23:02 shadcn