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.09k stars 231 forks source link

deploy failed #5

Closed javayhu closed 3 months ago

javayhu commented 3 months ago

Everything worked fine util I run bun run deploy, would you please help me?

bun run deploy
$ turbo deploy
• Packages in scope: @repo/eslint-config, @repo/shared-types, @repo/tailwind-config, @repo/typescript-config, @repo/ui, web
• Running deploy in 6 packages
• Remote caching disabled
web:deploy: cache miss, executing 3e73eb0ca86ae74c
web:deploy: $ bun pages:build && wrangler pages deploy
web:deploy: $ bunx @cloudflare/next-on-pages
web:deploy: ⚡️ @cloudflare/next-on-pages CLI v.1.12.1
web:deploy: ⚡️ Detected Package Manager: bun (1.1.20)
web:deploy: ⚡️ Preparing project...
web:deploy: ⚡️ Project is ready
web:deploy: ⚡️ Building project...
web:deploy: ▲  (node:36041) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
web:deploy: ▲  (Use `node --trace-deprecation ...` to show where the warning was created)
web:deploy: ▲  (node:36041) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
web:deploy: ▲  Vercel CLI 34.4.0
web:deploy: ▲  Detected `bun.lockb` generated by bun@1.x
web:deploy: ▲  Warning: Bun is used as a package manager at build time only, not at runtime with Functions
web:deploy: ▲  WARNING: You should not upload the `.next` directory.
web:deploy: ▲  Installing dependencies...
web:deploy: ▲  bun install v1.1.20 (ae194892)
web:deploy: ▲
web:deploy: ▲  Checked 1179 installs across 1167 packages (no changes) [625.00ms]
web:deploy: ▲  Detected Next.js version: 14.2.5
web:deploy: ▲  Running "bun run build"
web:deploy: ▲  $ next build
web:deploy: ▲  Attention: Next.js now collects completely anonymous telemetry regarding usage.
web:deploy: ▲  This information is used to shape Next.js' roadmap and prioritize features.
web:deploy: ▲  You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
web:deploy: ▲  https://nextjs.org/telemetry
web:deploy: ▲  ▲ Next.js 14.2.5
web:deploy: ▲
web:deploy: ▲  Creating an optimized production build ...
web:deploy: ▲  (node:36239) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
web:deploy: ▲  (Use `node --trace-deprecation ...` to show where the warning was created)
web:deploy: ▲  Failed to compile.
web:deploy: ▲  ../../packages/ui/hooks/use-controllable-state.ts
web:deploy: ▲  Module not found: Can't resolve '@repo/ui/hooks/use-callback-ref.js'
web:deploy: ▲
web:deploy: ▲  https://nextjs.org/docs/messages/module-not-found
web:deploy: ▲
web:deploy: ▲  Import trace for requested module:
web:deploy: ▲  ./app/upload/file-uploader.tsx
web:deploy: ▲  ./app/upload/page.tsx
web:deploy: ▲
web:deploy: ▲  > Build failed because of webpack errors
web:deploy: ▲  error: script "build" exited with code 1
web:deploy: ▲  Error: Command "bun run build" exited with 1
web:deploy:
web:deploy: ⚡️ The Vercel build (`bunx vercel build`) command failed. For more details see the Vercel logs above.
web:deploy: ⚡️ If you need help solving the issue, refer to the Vercel or Next.js documentation or their repositories.
web:deploy:
web:deploy: error: script "pages:build" exited with code 1
web:deploy: error: script "deploy" exited with code 1
web:deploy: ERROR: command finished with error: command (/Users/javayhu/workspace/github/cloudflare-saas-stack/apps/web) /Users/javayhu/.nvm/versions/node/v22.2.0/bin/bun run deploy exited (1)
web#deploy: command (/Users/javayhu/workspace/github/cloudflare-saas-stack/apps/web) /Users/javayhu/.nvm/versions/node/v22.2.0/bin/bun run deploy exited (1)

 Tasks:    0 successful, 1 total
Cached:    0 cached, 1 total
  Time:    7.697s
Failed:    web#deploy

 ERROR  run failed: command  exited (1)
error: script "deploy" exited with code 1
amxv commented 3 months ago

having the same issue, lmk if you were able to fix :)

abaudhuin commented 3 months ago

I have a PR https://github.com/Dhravya/cloudflare-saas-stack/pull/3 fixing it if you want to try

amxv commented 3 months ago

thanks @abaudhuin it works now