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

CPA script doubles up on withPayload import in next.config #6517

Closed
paulpopus opened this issue May 27, 2024 · 2 comments
Closed

CPA script doubles up on withPayload import in next.config #6517

paulpopus opened this issue May 27, 2024 · 2 comments

Comments

@paulpopus
Copy link
Contributor

Link to reproduction

No response

Payload Version

beta.36

Node Version

20

Next.js Version

15-canary.0

Describe the Bug

When installing payload via the CPA script in an existing project, the nextjs config doubles up on the withPayload import so the output becomes the following

import { withPayload } from '@payloadcms/next/withPayload'
/** @type {import('next').NextConfig} */
import { withPayload } from "@payloadcms/next/withPayload";

const nextConfig = {
  reactStrictMode: true,
  swcMinify: true,
};

export default withPayload(withPayload(nextConfig));

Reproduction Steps

Run the cpa script in a project that already has payload initiliased pnpm dlx create-payload-app@beta

Adapters and Plugins

create-payload-app

@paulpopus paulpopus added status: needs-triage Possible bug which hasn't been reproduced yet v3 labels May 27, 2024
denolfe added a commit that referenced this issue May 28, 2024
Updates create-payload-app to update an existing payload installation

- Detects existing Payload installation. Fixes #6517 
- If not latest, will install latest and grab the `(payload)` directory
structure (ripped from `templates/blank-3.0`
@denolfe
Copy link
Member

denolfe commented May 28, 2024

Closed by #6193

@denolfe denolfe closed this as completed May 28, 2024
@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label May 28, 2024
Copy link

github-actions bot commented Sep 7, 2024

This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants