Dhravya / cloudflare-saas-stack

Quickly make and deploy full-stack apps with database, auth, styling, storage etc. figured out for you. Add all primitives you want.
3.07k stars 231 forks source link

stuck in creating a new project when deploy #10

Closed javayhu closed 3 months ago

javayhu commented 3 months ago

It's stuck when creating a new project when deploying.

web:deploy: ▲  Route (app)                              Size     First Load JS
web:deploy: ▲  ┌ ƒ /                                    1.62 kB        88.8 kB
web:deploy: ▲  ├ ○ /_not-found                          873 B            88 kB
web:deploy: ▲  ├ ƒ /api/[...nextauth]                   0 B                0 B
web:deploy: ▲  ├ ƒ /api/hello                           0 B                0 B
web:deploy: ▲  ├ ƒ /api/upload_image                    0 B                0 B
web:deploy: ▲  └ ○ /upload                              58.1 kB         145 kB
web:deploy: ▲  + First Load JS shared by all            87.2 kB
web:deploy: ▲  ├ chunks/1dd3208c-51bcef33bceef2af.js  53.6 kB
web:deploy: ▲  ├ chunks/874-8ef378c567c69127.js       31.6 kB
web:deploy: ▲  └ other shared chunks (total)          1.97 kB
web:deploy: ▲  ○  (Static)   prerendered as static content
web:deploy: ▲  ƒ  (Dynamic)  server-rendered on demand
web:deploy: ▲  Traced Next.js server files in: 16.534ms
web:deploy: ▲  Created all serverless functions in: 13.26ms
web:deploy: ▲  Collected static files (public/, static/, .next/static): 3.402ms
web:deploy: ▲  Build Completed in .vercel/output [11s]
web:deploy: ⚡️ Completed `bunx vercel build`.
web:deploy:
web:deploy: ⚡️ Build Summary (@cloudflare/next-on-pages v1.12.1)
web:deploy: ⚡️
web:deploy: ⚡️ Edge Function Routes (4)
web:deploy: ⚡️   ┌ /
web:deploy: ⚡️   ├ /api/[...nextauth]
web:deploy: ⚡️   ├ /api/hello
web:deploy: ⚡️   └ /api/upload_image
web:deploy: ⚡️
web:deploy: ⚡️ Prerendered Routes (3)
web:deploy: ⚡️   ┌ /favicon.ico
web:deploy: ⚡️   ├ /upload
web:deploy: ⚡️   └ /upload.rsc
web:deploy: ⚡️
web:deploy: ⚡️ Other Static Assets (36)
web:deploy: ⚡️   ┌ /_app.rsc.json
web:deploy: ⚡️   ├ /_document.rsc.json
web:deploy: ⚡️   ├ /_error.rsc.json
web:deploy: ⚡️   ├ /404.html
web:deploy: ⚡️   └ ... 32 more
web:deploy:
web:deploy: ⚡️ Build log saved to '.vercel/output/static/_worker.js/nop-build-log.json'
web:deploy: ⚡️ Generated '.vercel/output/static/_worker.js/index.js'.
web:deploy: ⚡️ Build completed in 0.61s
web:deploy: The project you specified does not exist: "cloudflare-saas-starter". Would you like to create it?
web:deploy: ❯ Create a new project
Dhravya commented 3 months ago

Looks like that's something to do with turborepo. Can you try

cd apps/web
bun run deploy
javayhu commented 3 months ago

@Dhravya thanks for your reply. It's still stuck, kind of wired.

bun run deploy
$ bun pages:build && wrangler pages deploy
$ bunx @cloudflare/next-on-pages
⚡️ @cloudflare/next-on-pages CLI v.1.12.1
⚡️ Detected Package Manager: bun (1.1.20)
⚡️ Preparing project...
⚡️ Project is ready
⚡️ Building project...
▲  (node:65100) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
▲  (Use `node --trace-deprecation ...` to show where the warning was created)
▲  (node:65100) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
▲  Vercel CLI 34.4.0
▲  Detected `bun.lockb` generated by bun@1.x
▲  Warning: Bun is used as a package manager at build time only, not at runtime with Functions
▲  WARNING: You should not upload the `.next` directory.
▲  Installing dependencies...
▲  bun install v1.1.20 (ae194892)
▲
▲  Checked 1184 installs across 1172 packages (no changes) [292.00ms]
▲  Detected Next.js version: 14.2.5
▲  Running "bun run build"
▲  $ next build
▲  ▲ Next.js 14.2.5
▲
▲  Creating an optimized production build ...
▲  ✓ Compiled successfully
▲  Skipping linting
▲  Checking validity of types ...
▲  Collecting page data ...
▲  ⚠ Using edge runtime on a page currently disables static generation for that page
▲  Generating static pages (0/5) ...
▲  Generating static pages (1/5)
▲  Generating static pages (2/5)
▲  Generating static pages (3/5)
▲  ✓ Generating static pages (5/5)
▲  Finalizing page optimization ...
▲  Collecting build traces ...
▲
▲  Route (app)                              Size     First Load JS
▲  ┌ ƒ /                                    1.62 kB        88.8 kB
▲  ├ ○ /_not-found                          873 B            88 kB
▲  ├ ƒ /api/[...nextauth]                   0 B                0 B
▲  ├ ƒ /api/hello                           0 B                0 B
▲  ├ ƒ /api/upload_image                    0 B                0 B
▲  └ ○ /upload                              58.1 kB         145 kB
▲  + First Load JS shared by all            87.2 kB
▲  ├ chunks/1dd3208c-51bcef33bceef2af.js  53.6 kB
▲  ├ chunks/874-8ef378c567c69127.js       31.6 kB
▲  └ other shared chunks (total)          1.97 kB
▲
▲
▲  ○  (Static)   prerendered as static content
▲  ƒ  (Dynamic)  server-rendered on demand
▲  Traced Next.js server files in: 11.668ms
▲  Created all serverless functions in: 15.216ms
▲  Collected static files (public/, static/, .next/static): 2.248ms
▲  Build Completed in .vercel/output [12s]
⚡️ Completed `bunx vercel build`.

⚡️ Build Summary (@cloudflare/next-on-pages v1.12.1)
⚡️
⚡️ Edge Function Routes (4)
⚡️   ┌ /
⚡️   ├ /api/[...nextauth]
⚡️   ├ /api/hello
⚡️   └ /api/upload_image
⚡️
⚡️ Prerendered Routes (3)
⚡️   ┌ /favicon.ico
⚡️   ├ /upload
⚡️   └ /upload.rsc
⚡️
⚡️ Other Static Assets (36)
⚡️   ┌ /_app.rsc.json
⚡️   ├ /_document.rsc.json
⚡️   ├ /_error.rsc.json
⚡️   ├ /404.html
⚡️   └ ... 32 more

⚡️ Build log saved to '.vercel/output/static/_worker.js/nop-build-log.json'
⚡️ Generated '.vercel/output/static/_worker.js/index.js'.
⚡️ Build completed in 0.59s
The project you specified does not exist: "cloudflare-saas-starter". Would you like to create it?
❯ Create a new project
Dhravya commented 3 months ago

Try wrangler pages project create cloudflare-saas-starter ?

javayhu commented 3 months ago

@Dhravya Thanks very much! deploy succeed! ❤

but the page shows an error when I visit cloudflare-saas-starter-66t.pages.dev, do you know where to check out the server logs?

Application error: a server-side exception has occurred (see the server logs for more information).
Digest: 1878710604
Dhravya commented 3 months ago

Go to the cloudflare dashboard, you should see a "Workers and Pages" section on the left side of the screen. Then, go to your project, click on this button

image

under "Functions" you'll see "Begin log stream"

image
Dhravya commented 3 months ago

Looks like this is the error @javayhu https://github.com/Dhravya/cloudflare-saas-stack/issues/8#issuecomment-2246027533

It's fixed in the setup script now