Skip to content
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

Payload is unable to resolve @floating-ui/react and react-onclickoutside packages. #9401

Closed
shawqicauses opened this issue Nov 21, 2024 · 2 comments

Comments

@shawqicauses
Copy link

Describe the Bug

Salam everyone.

I have created a Next.JS application using npx create-next-app@latest then initialised Payload using npx create-payload-app.

When I navigated to /admin an error occurred saying something like Unable to resolve @floating-ui/react.

When I have downloaded @floating-ui/react and react-onclickoutside package, everything worked just fine.

This is the commit for what I have done to fix it in my repository:
shawqicauses/shawqi-stack@8140c6c

Thanks.

Link to the code that reproduces this issue

https://github.com/shawqicauses/shawqi-stack

Reproduction Steps

  1. Creating Next.JS application using npx create-next-app@latest
  2. Initialising Payload CMS application using npx create-payload-app

Which area(s) are affected? (Select all that apply)

area: core

Environment Info

Next.JS version 15
@shawqicauses shawqicauses added status: needs-triage Possible bug which hasn't been reproduced yet validate-reproduction labels Nov 21, 2024
@denolfe
Copy link
Member

denolfe commented Nov 21, 2024

What package manager? There is not a lockfile checked into your reproduction. Also please provide the output of payload info.

@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label Nov 21, 2024
@denolfe denolfe added status: cant-reproduce If an issue cannot be reproduced and removed status: awaiting-reply labels Nov 21, 2024
@denolfe
Copy link
Member

denolfe commented Nov 21, 2024

Also, either you're using an outdated create-payload-app, or create-payload-app wasn't used in creating your reproduction.

Whenever a project is made using cpa, an .npmrc file is written that contains legacy-peer-deps=true in it, which will handle automatically installing peer dependencies.

This is the file tree for blank

.
├── .env.example
├── .eslintrc.cjs
├── .gitignore
├── .npmrc
├── .prettierrc.json
├── .yarnrc
├── Dockerfile
├── README.md
├── docker-compose.yml
├── next.config.mjs
├── package-lock.json
├── package.json
├── src
│   ├── app
│   ├── collections
│   ├── payload-types.ts
│   └── payload.config.ts
└── tsconfig.json

@denolfe denolfe closed this as completed Nov 21, 2024
@github-actions github-actions bot removed the status: cant-reproduce If an issue cannot be reproduced label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants