payloadcms / payload

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
https://payloadcms.com
MIT License
24.73k stars 1.57k forks source link

Payload Cloud build fails with beta-117 #8835

Open Because789 opened 4 days ago

Because789 commented 4 days ago

Describe the Bug

I just deployed a new version to Cloud and the build failed. No issues with local pnpm build, but getting this warning on Cloud build:

[2024-10-22T20:03:29]
│ Creating an optimized production build ...
[2024-10-22T20:03:58]
│ <w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Unable to snapshot resolve dependencies

And this error on deploy:

✓ Starting...
[2024-10-22T20:17:11]
Error: Could not find a production build in the '.next' directory. Try building your app with 'next build' before starting the production server. https://nextjs.org/docs/messages/production-start-no-build-id
[2024-10-22T20:17:11]
at setupFsCheck (/workspace/node_modules/.pnpm/next@15.0.0_react-dom@19.0.0-rc-65a56d0e-20241020_react@19.0.0-rc-65a56d0e-20241020__react@19_7kfqem4pd6aim6nxuy4v6dxrry/node_modules/next/dist/server/lib/router-utils/filesystem.js:149:19)
[2024-10-22T20:17:11]
at async initialize (/workspace/node_modules/.pnpm/next@15.0.0_react-dom@19.0.0-rc-65a56d0e-20241020_react@19.0.0-rc-65a56d0e-20241020__react@19_7kfqem4pd6aim6nxuy4v6dxrry/node_modules/next/dist/server/lib/router-server.js:65:23)
[2024-10-22T20:17:11]
at async Server.<anonymous> (/workspace/node_modules/.pnpm/next@15.0.0_react-dom@19.0.0-rc-65a56d0e-20241020_react@19.0.0-rc-65a56d0e-20241020__react@19_7kfqem4pd6aim6nxuy4v6dxrry/node_modules/next/dist/server/lib/start-server.js:266:36)
[2024-10-22T20:17:11]
ELIFECYCLE  Command failed with exit code 1.

Edit: Our User ID is 66c72bd7d6737508e32c4a05, if that helps.

Link to the code that reproduces this issue

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

Reproduction Steps

I guess the issue comes up, if you just deploy a beta-117 website (or even blank) template to Payload Cloud. It's late here, can't test it. If it's my project, I'll be back tomorrow.

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

Not sure

Environment Info

Binaries: Node: 20.17.0 npm: 10.8.2 Yarn: N/A pnpm: 9.12.0 Relevant Packages: payload: 3.0.0-beta.117 next: 15.0.0 @payloadcms/db-mongodb: 3.0.0-beta.117 @payloadcms/email-nodemailer: 3.0.0-beta.117 @payloadcms/graphql: 3.0.0-beta.117 @payloadcms/next/utilities: 3.0.0-beta.117 @payloadcms/plugin-cloud: 3.0.0-beta.117 @payloadcms/plugin-nested-docs: 3.0.0-beta.117 @payloadcms/plugin-seo: 3.0.0-beta.117 @payloadcms/richtext-lexical: 3.0.0-beta.117 @payloadcms/translations: 3.0.0-beta.117 @payloadcms/ui/shared: 3.0.0-beta.117 react: 19.0.0-rc-65a56d0e-20241020 react-dom: 19.0.0-rc-65a56d0e-20241020

Because789 commented 3 days ago

I created a fresh beta-117 app with MongoDB and website template (https://github.com/StoriesForFuture/cloud-test). I set up a new Cloud project (ID: 67196c2c4ad826530a4016b0) and the deployment went through.

So, it seems to be something specific to my project, even though it builds locally without issues and ran until beta-113 smoothly (Project ID: 66c738d5d6737508e32c745a). As of now, deployment fails with the same error as above.

Btw., I really wish we could see previous build and deploy logs. Now you blink and they are gone.

Because789 commented 2 days ago

Hey @denolfe, I would really appreciate, if someone could look into this today. Our project is obviously not mission-critical, if it were, I would not be playing around with beta software. But I have a presentation tomorrow and would really prefer to show the latest state, and not the work from last week :)

Everything I find on <w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Unable to snapshot resolve dependencies points to a server issue and includes solutions like deleting node_modules/, .next folder and lock files (like https://github.com/vercel/next.js/issues/47394#issuecomment-1657223047). So I'm really out of ideas, what I could do on my end.

denolfe commented 2 days ago

Hey @Because789 , I've just tested this and was able to deploy successfully.

  1. pnpx create-payload-app@beta my-project -t website, which picked up beta 118
  2. Push to a github repo
  3. Create new project in Payload Cloud, import from repo

Deployed successfully for me.

Because789 commented 2 days ago

Hey @denolfe, I'm glad to hear from you, but that's pretty much what I wrote here: https://github.com/payloadcms/payload/issues/8835#issuecomment-2433576326

Yeah, I know it's my project, and I still have no clue what the issue could be.

Because789 commented 2 days ago

@denolfe, ok, some news, the project ID 66c738d5d6737508e32c745a, the one which produces the error above, seems to be bugged on your servers.

I created a new project with the same repository and guess what, the deployment went through (project ID 671a96cfbb80720307f3e4ec). This is definitely an issue with the Cloud service.

Edit: Domains are still no working and in addition to that, when I try to delete an environment variable in 66c738d5d6737508e32c745a, it doesn't work. The project is bugged on multiple parts.