blitz-js / legacy-framework

MIT License
2 stars 2 forks source link

blitzServer.at is not a function error when running "blitz generate resource test" #997

Open vigneshrajj opened 1 year ago

vigneshrajj commented 1 year ago

What is the problem?

I get blitzServer.at is not a function error when I try to generate anything (resource, all, queries, etc.) using blitz in a freshly created project.

Paste all your error logs here:

Loaded env from projectDir/.env.local
Loaded env from projectDir/.env
TypeError: blitzServer.at is not a function
    at /usr/local/lib/node_modules/blitz/node_modules/@blitzjs/generator/dist/index.cjs:309:75
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/blitz/node_modules/@blitzjs/generator/dist/index.cjs:273:24)

Paste all relevant code snippets here:

blitz generate all test

What are detailed steps to reproduce this?

  1. Run blitz new test
  2. Go to the project directory
  3. Run blitz generate all test

Run blitz -v and paste the output here:

Blitz version: 2.0.0-beta.20 (global)
Blitz version: 2.0.0-beta.20 (local)
Linux 6.0 | linux-x64 | Node: v14.19.3

 Package manager: npm

  System:
    OS: Linux 6.0 Fedora Linux 37 (Workstation Edition)
    CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
    Memory: 3.99 GB / 11.59 GB
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 14.19.3 - /usr/bin/node
    Yarn: Not Found
    npm: 8.19.0 - /usr/local/bin/npm
  npmPackages:
    @blitzjs/auth: 2.0.0-beta.20 => 2.0.0-beta.20 
    @blitzjs/next: 2.0.0-beta.20 => 2.0.0-beta.20 
    @blitzjs/rpc: 2.0.0-beta.20 => 2.0.0-beta.20 
    @prisma/client: 4.6.0 => 4.6.0 
    blitz: 2.0.0-beta.20 => 2.0.0-beta.20 
    next: 12.2.5 => 12.2.5 
    prisma: 4.6.0 => 4.6.0 
    react: 18.2.0 => 18.2.0 
    react-dom: 18.2.0 => 18.2.0 
    typescript: ^4.8.4 => 4.9.4 

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

No response