#Can anyone help me simple create Payloadcms + Next.js project?

1 messages ยท Page 1 of 1 (latest)

brittle whale
#

I have tried all your guides and I just not got it to work? Can anyone help me understand the issues I got?

prime yarrowBOT
fading igloo
#

Hey @brittle whale can you post some screenshots of the issues you're experiencing?

brittle whale
#

I try create "npx create-payload-app my-starter -t website", but when I seed the database and go to page I just come to blank page?
Error in terminal you see in the screenshot

#

I got some second on the page with content and then jump to blanc page?

#

I use this repo:
https://github.com/payloadcms/next-payload-demo

I follow the guid exactly and have tried multi times now.

When I go to localhost/admin and create user, after that I been redirect to login-page. I fill out my email and password, but nothing happens? I just come back to empty inlog-page? In the terminal I got "Connected to MongoDB server successfully!" so its not seems to be wrong ther?

I just want som simple way to start payload project with next.js as fronend??

GitHub

Contribute to payloadcms/next-payload-demo development by creating an account on GitHub.

fading igloo
#

Hey Kaj - give me a few minutes and let me see if I can recreate this.

#

the website template does provide a frontend + backend

brittle whale
#

Hi Sean!

#

Did you changes anything in the next-payload-demo repo? Cuz now its working ๐Ÿ™‚

#

But I got this when I run yarn dev:

Do you know what this meen?

brittle whale
#

I tried the latest version again. Created of "npx create-payload-app my-starter -t website". Yesterday I got the problem that the index-page only shows in browser for a secound and then just blanc page, this was in Safari. Today I tried in Google Chrome and in that browser I didn't got any problem?

fading igloo
#

Have you made changes to the next.config file? If so could you share the file with me?

brittle whale
#

No I havn't touch it

#

I have tried other web browser and its same there. You see the fronend site for a second and then its disappears it.

#

When I try to seed database in admin I got this in terminal:

brittle whale
#

I can see direct in database that everyting has created there

#

When I try click on preview button I got to the page with just "Invalid token"

fading igloo
#

our templates weren't working the other day in npx create payload - but appear to be again, so I'll spin this up and test. Give me a few minutes here!

brittle whale
#

Ok, thanks so much!

brittle whale
#

Im trying next-payload-demo repo and create page there, go to the site and then I got this error:
Error: Failed to parse src "//yoga-pose-8.png" on next/image, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://). Also in when I upload images in admin I cant see preview picture?

fading igloo
#

Hey Kaj - I'd like to see if we can't start from scratch here as it sounds like you're trying a few different repos here

next sinew
#

Sorry to slide into this support thread @brittle whale . I am also just started getting into payload and would love to try postgresdb, drizzle + payload 2.0 both deployed on vercel with next.js (app router). I saw three repos, but not sure which one to use as a reference:

  1. Custom Server: https://github.com/payloadcms/payload/tree/main/examples/custom-server

  2. Website: https://github.com/payloadcms/payload/tree/main/templates/website

  3. next-payload: https://github.com/payloadcms/next-payload

Would appreciate any guidance @fading igloo ๐Ÿ™

GitHub

The best way to build a modern backend + admin UI. No black magic, all TypeScript, and fully open-source, Payload is both an app framework and a headless CMS. - payloadcms/payload

GitHub

The best way to build a modern backend + admin UI. No black magic, all TypeScript, and fully open-source, Payload is both an app framework and a headless CMS. - payloadcms/payload

GitHub

A utility to deploy Payload serverlessly within a Next.js app - GitHub - payloadcms/next-payload: A utility to deploy Payload serverlessly within a Next.js app

fading igloo
#

For @brittle whale

  1. npx create-payload-app@latest my-starter -t website

  2. Yes (if asked to install create-payload-app

  3. Select MongoDB

  4. Once it completes (if there are no errors) cd into the folder it created and run yarn

  5. note any errors there as well

6 if no errors run yarn dev

#

@next sinew that depends on what you are trying to do. The Website template includes a frontend + backend, whereas the other templates only include the CMS

next sinew
#

@fading igloo I have my existing frontend (next app router) and postgres db on neon (with drizzle for core app logic) and want to start using payload with postgres for the content.

So maybe I should just start with a ready made website template and then try to reverse engineer on how I can pick out the pieces of payload and build them up in my own repo?

brittle whale
#

Thank so so much @fading igloo ! I try this out bit later ๐Ÿ™

#

No problem @next sinew !

fading igloo
#

I think that would be a good starting point @next sinew !

#

for @brittle whale take specific note after each step, I have a feeling something didn't install properly in the process and that's why you're experiencing issues

brittle whale
#

@fading igloo Ok, I will! Thanks

brittle whale
#

@fading igloo Its no error and under the installation!

#

@fading igloo but when I run yarn dev I got some error about webpack?

#

@fading igloo I create account and click on "Seed your database" I got this in my terminal:

#

@fading igloo ...and same problem as yesterday when I try to reach the first-page. I can se it for a second and then just blanc page?

#

@fading igloo ...and when I try to reach the pages from preview-button in admin I got to the page with just text "Invalid token"