blitz-js / blitz

⚡️ The Missing Fullstack Toolkit for Next.js
https://Blitzjs.com
MIT License
13.68k stars 798 forks source link

Blitz console not working when using on a project without db #4109

Closed n3n closed 1 year ago

n3n commented 1 year ago

What is the problem?

Blitz console not working when using on a project without db (New blitz project and choose "Minimal — no DB, no auth" template).

Paste all your error logs here:

Loaded env from /Users/n3n/Workspace/blitz-demo/.env.local
Loaded env from /Users/n3n/Workspace/blitz-demo/.env
You have entered the Blitz console
Tips: - Exit by typing .exit or pressing Ctrl-D
Error: db/schema.prisma does not exist and Prisma configuration not found in package.json. Please either create the db folder or add the prisma schema path to the package.json

What are detailed steps to reproduce this?

  1. Create a new blitz project blitz new
  2. Choose template "Minimal — no DB, no auth"
  3. Then try blitz console

Run blitz -v and paste the output here:

Blitz version: 2.0.0-beta.23 (global)
Blitz version: 2.0.0-beta.23 (local)
macOS Ventura | darwin-arm64 | Node: v16.13.2

 Package manager: npm

  System:
    OS: macOS 13.0.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 63.11 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node
    Yarn: 1.22.17 - /opt/homebrew/bin/yarn
    npm: 8.1.2 - ~/.nvm/versions/node/v16.13.2/bin/npm
  npmPackages:
    @blitzjs/auth: 2.0.0-beta.23 => 2.0.0-beta.23 
    @blitzjs/next: 2.0.0-beta.23 => 2.0.0-beta.23 
    @blitzjs/rpc: 2.0.0-beta.23 => 2.0.0-beta.23 
    @prisma/client: Not Found
    blitz: 2.0.0-beta.23 => 2.0.0-beta.23 
    next: 13.1 => 13.1.6 
    prisma: Not Found
    react: 18.2.0 => 18.2.0 
    react-dom: 18.2.0 => 18.2.0 
    typescript: ^4.8.4 => 4.9.5 

Please include below any other applicable logs and screenshots that show your problem:

No response

siddhsuresh commented 1 year ago

Hey @n3n, what is your use case for using blitz console without db?

n3n commented 1 year ago

Hey @n3n, what is your use case for using blitz console without db?

For some projects, I only work with a 3rd party or API, and I need to test integrations, queries and mutations in the console.