[BUG] - Can't be installed in a fresh nextjs project
kewang-codes opened this issue · 2 comments
NextUI Version
2.4.8
Describe the bug
npm install @nextui-org/react framer-motion
failed.
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
- Step 1. install nextjs:
npx create-next-app@latest
✔ What is your project named? … my-app
✔ Would you like to use TypeScript? … No
✔ Would you like to use ESLint? … Yes
✔ Would you like to use Tailwind CSS? … Yes
✔ Would you like your code inside a src/
directory? … No
✔ Would you like to use App Router? (recommended) … Yes
✔ Would you like to use Turbopack for next dev? … No
✔ Would you like to customize the import alias (@/* by default)? … No
- Step 2. install nextUI
cd my_app
npm install @nextui-org/react framer-motion
Then, it shows the following error:
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: my-app@0.1.0
npm error Found: react@19.0.0-rc-66855b96-20241106
npm error node_modules/react
npm error react@"19.0.0-rc-66855b96-20241106" from the root project
npm error peer react@"19.0.0-rc-66855b96-20241106" from react-dom@19.0.0-rc-66855b96-20241106
npm error node_modules/react-dom
npm error react-dom@"19.0.0-rc-66855b96-20241106" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react@">=18" from @nextui-org/react@2.4.8
npm error node_modules/@nextui-org/react
npm error @nextui-org/react@"*" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /Users/pthreadself/.npm/_logs/2024-11-08T05_30_33_606Z-eresolve-report.txt
npm error A complete log of this run can be found in: /Users/pthreadself/.npm/_logs/2024-11-08T05_30_33_606Z-debug-0.log
Expected behavior
npm install @nextui-org/react framer-motion
should succeed
Screenshots or Videos
No response
Operating System Version
macOS
Browser
Chrome
2.4.8 and framer-motion don't support react 19. If you need to support react 19, you may use our beta version with "framer-motion": "12.0.0-alpha.1"
.