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.
2.97k stars 213 forks source link

Fix bad import blocking deploy #3

Closed abaudhuin closed 1 month ago

abaudhuin commented 1 month ago

I think an import is bad blocking bun run deploy.

I still encounter a problem after this fix:

web:deploy: ▲  Creating an optimized production build ...
web:deploy: ▲  ✓ Compiled successfully
web:deploy: ▲  Linting and checking validity of types ...
web:deploy: ▲  The `next` config requires an optional peer dependency, which has not been installed.
web:deploy: ▲  To install it, run:
web:deploy: ▲  - bun install @next/eslint-plugin-next@>=12.3.0 <15
web:deploy: ▲  
web:deploy: ▲  > Build error occurred
web:deploy: ▲  Error: Jest worker encountered 1 child process exceptions, exceeding retry limit
web:deploy: ▲    at ChildProcessWorker.initialize (/home/amb/workspace/cloudflare-saas-stack/node_modules/next/dist/compiled/jest-worker/index.js:1:11580)
web:deploy: ▲    at ChildProcessWorker._onExit (/home/amb/workspace/cloudflare-saas-stack/node_modules/next/dist/compiled/jest-worker/index.js:1:12545)
web:deploy: ▲    at ChildProcess.emit (node:events:519:28)
web:deploy: ▲    at ChildProcess.emit (node:domain:488:12)
web:deploy: ▲    at ChildProcess._handle.onexit (node:internal/child_process:294:12) {
web:deploy: ▲  type: 'WorkerError'
web:deploy: ▲  }
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 (/home/amb/workspace/cloudflare-saas-stack/apps/web) /home/amb/.bun/bin/bun run deploy exited (1)
web#deploy: command (/home/amb/workspace/cloudflare-saas-stack/apps/web) /home/amb/.bun/bin/bun run deploy exited (1)

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

 ERROR  run failed: command  exited (1)
error: script "deploy" exited with code 1

Do you have any idea why ?

DiogoDuart3 commented 1 month ago

That fixes the first erro but i still get an error related to eslint next?

image

DiogoDuart3 commented 1 month ago

Modifying the next.config.mjs fixed the problem

image

abaudhuin commented 1 month ago

Thank you! Added to the PR, deploying works now :)