#Can anyone help me simple create Payloadcms + Next.js project?
1 messages ยท Page 1 of 1 (latest)
Help is on the way! To mark it as solved, use the /solve command. In the meantime, here are some existing threads that may help you:
Documentation:
Community-Help:
Hey @brittle whale can you post some screenshots of the issues you're experiencing?
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??
Hey Kaj - give me a few minutes and let me see if I can recreate this.
the website template does provide a frontend + backend
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?
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?
Have you made changes to the next.config file? If so could you share the file with me?
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:
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"
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!
Ok, thanks so much!
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?
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
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:
-
Custom Server: https://github.com/payloadcms/payload/tree/main/examples/custom-server
-
Website: https://github.com/payloadcms/payload/tree/main/templates/website
-
next-payload: https://github.com/payloadcms/next-payload
Would appreciate any guidance @fading igloo ๐
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
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
For @brittle whale
-
npx create-payload-app@latest my-starter -t website -
Yes (if asked to install create-payload-app
-
Select MongoDB
-
Once it completes (if there are no errors) cd into the folder it created and run yarn
-
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
@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?
Thank so so much @fading igloo ! I try this out bit later ๐
No problem @next sinew !
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
@fading igloo Ok, I will! Thanks
@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"